我正在使用这段代码,但它的工作方式与API v2不同,请提供用于提取youtube评论的代码。在
import gdata.youtube.service
yts = gdata.youtube.service.YouTubeService()
ytfeed = yts.GetYouTubeVideoCommentFeed(video_id="pXhcPJK5cMc")
comments = [comment.content.text for comment in ytfeed.entry]
Tags:
要使用YouTube API v.3提取YouTube视频评论,需要以下Python代码:
有关此代码的详细信息,以及如何使用YouTube API使用关键字搜索视频,然后将注释保存到CSV文件中,可以查看此教程:https://python.gotrained.com/youtube-api-extracting-comments/
相关问题 更多 >
编程相关推荐