【发布时间】:2021-05-03 18:32:02
【问题描述】:
我一直在尝试使用 YouTube 数据 API 从美国获取热门新闻视频。但是,虽然我没有收到错误,但我没有收到任何结果。我很难相信没有结果,因为 YouTube 的热门新闻页面显示了很多视频。
我得到了什么:
{'kind': 'youtube#videoListResponse', 'etag': 'KtFSnIG_fmDzS9uX1a7JuXFZJbk', 'items': [], 'pageInfo': {'totalResults': 0, 'resultsPerPage': 5}}
我的代码:
youtube = build("youtube","v3", developerKey=apiKey)
request = youtube.videos().list(
part = "id",
chart = "mostPopular",
regionCode = "US",
videoCategoryId = "25"
)
response = request.execute()
print(response)
【问题讨论】:
-
我确认复制您的问题。删除
videoCategoryId或将其更改为10,我确实获得了视频ID列表。我建议通过其own issue tracker site 直接向 Google 提交错误报告。 -
@stvar 好的,我会提交一份大报告
-
Here 是错误报告的链接。
标签: youtube-api youtube-data-api google-api-python-client