在 YouTube 上搜索内容时,我试图从前一百个左右的结果中获取数据。我发现了一些谷歌提供的代码字符串,但我无法正确执行它们:
def SearchAndPrint(search_terms):
yt_service = gdata.youtube.service.YouTubeService()
query = gdata.youtube.service.YouTubeVideoQuery()
query.vq = search_terms
query.orderby = 'viewCount'
query.racy = 'include'
feed = yt_service.YouTubeQuery(query)
PrintVideoFeed(feed)
任何帮助是极大的赞赏!