从频道中抓取所有YouTube链接

时间:2013-06-13 02:55:54

标签: youtube-api

以下链接以JSON格式抓取youtube视频,但它似乎只能抓取500个视频中的66个视频

http://gdata.youtube.com/feeds/api/users/EEVblog/uploads?alt=json

我如何获取所有视频网址而不仅仅是66(因为有些是重复的,所以它总共不是66个)

1 个答案:

答案 0 :(得分:2)

我建议使用Data API的v3,但不管......

您应该将start-index和max-results参数与上面列出的gdata Feed一起使用。

例如,这个电话: http://gdata.youtube.com/feeds/api/users/EEVblog/uploads?alt=json

具有此值的名为“next”的属性: http://gdata.youtube.com/feeds/api/users/EEVblog/uploads?alt=json&start-index=26&max-results=25

之后的下一个电话会是: http://gdata.youtube.com/feeds/api/users/EEVblog/uploads?alt=json&start-index=51&max-results=25

我以这种方式获得超过66个结果,它一次只显示25个......

相关问题