【问题标题】:Grab all YouTube links from a channel从频道中获取所有 YouTube 链接
【发布时间】:2013-06-09 07:55:13
【问题描述】:

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

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

我将如何获取所有视频 url 而不仅仅是 66 个(也不是总共 66 个,因为有些是重复的)

【问题讨论】:

    标签: youtube-api


    【解决方案1】:

    我建议使用数据 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 个...

    【讨论】:

      猜你喜欢
      • 2016-05-13
      • 2021-03-14
      • 2022-12-12
      • 1970-01-01
      • 1970-01-01
      • 2016-03-01
      • 2015-09-02
      • 2011-09-13
      • 2016-03-12
      相关资源
      最近更新 更多