当尝试读取此类 url
URL 时: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor,oc: U0dWSlhTVF9FSkNNNl9QTVhJ&算法=节流系数&itag=34&ipbits=0&burst=40&sver=3&expire=1275886800&key=yt1&signature=89195E808CB3FBBC7BDE7298A1DC0613D79 87F00.D3064112E8F479C523F8DF4FBFDF392CE48167C2&factor=1.25&id=34e01ad39b34b5c9&
我收到此错误
<块引用>
读取/二进制 URL
连接到:v4.lscache2.c.youtube.com
** 用户错误:错误。目标网址:http: //v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,
itag,算法...
** 附近:读取/二进制 url
when trying to read this kind of url
URL: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor,oc:U0dWSlhTVF9FSkNNNl9QTVhJ&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1275886800&key=yt1&signature=89195E808CB3FBBC7BDE7298A1DC0613D7987F00.D3064112E8F479C523F8DF4FBFDF392CE48167C2&factor=1.25&id=34e01ad39b34b5c9&
I get this error
read/binary url
connecting to: v4.lscache2.c.youtube.com
** User Error: Error. Target url: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,
itag,algorithm...
** Near: read/binary url
发布评论
评论(1)
在《Rebol 3》中,你会得到:
你得到的信息是《Rebol 2》中不那么雄辩的表达方式。 (您也可以在 Firebug 中输入它,然后发现使用这个原始 URL 不起作用。)
我想 YouTube 只会在请求的 HTTP 标头与特定模式匹配时才允许您获取流。它可能会寻找专门为您的会话制作的 cookie,并设计为在特定时间后过期。
据我了解,YouTube 不太热衷于第三方下载视频数据。他们曾经有一个
get_video
API,但似乎已禁用它。因此,您要么必须伪造一个 cookie,让他们认为您是他们的玩家之一,要么找到对此类应用程序更友好的服务。In Rebol 3 you get:
The message you're getting is Rebol 2's not-so-eloquent way of saying that. (You can also enter it in Firebug and see that using this raw URL does not work.)
I'd imagine that YouTube will only let you get the stream if the requesting HTTP header matches a certain pattern. Among potential things it might look for is a cookie specifically crafted for your session and designed to expire after a certain time.
As far as I understand it YouTube is not too keen on third party downloads of video data. They used to have a
get_video
API but appear to have disabled it. So you'll either have to fake up a cookie and make them think you're one of their players, or find a service which is friendlier to this sort of application.