以下链接以 JSON 格式抓取 youtube 视频,但似乎只抓取了 500 个视频中的 66 个视频~
http://gdata.youtube.com/feeds/api/users/EEVblog/uploads?alt=json
我将如何获取所有视频网址而不仅仅是 66 个(也不是总共 66 个,因为有些是重复的)
以下链接以 JSON 格式抓取 youtube 视频,但似乎只抓取了 500 个视频中的 66 个视频~
http://gdata.youtube.com/feeds/api/users/EEVblog/uploads?alt=json
我将如何获取所有视频网址而不仅仅是 66 个(也不是总共 66 个,因为有些是重复的)
我建议使用数据 API 的 v3,但无论如何...
您应该在上面列出的 gdata 提要中使用 start-index 和 max-results 参数。
例如,这个调用: 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 个......