Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3708

How to get all comments (more than 100) of a video using YouTube Data API V3?

$
0
0

I am currently working on a project and I need to collect all the comments of few specific youtube videos.
I am able to get at max 100 comments using commentThreads().list function (More here). Is there any way to get all the comments ?

I am using below function which is provided by Google YouTube Data API developer guide.

def get_comment_threads(youtube, video_id):  results = youtube.commentThreads().list(    part="snippet",    maxResults=100,    videoId=video_id,    textFormat="plainText"  ).execute()  for item in results["items"]:    comment = item["snippet"]["topLevelComment"]    author = comment["snippet"]["authorDisplayName"]    text = comment["snippet"]["textDisplay"]    print "Comment by %s: %s" % (author, text)  return results["items"]

Viewing all articles
Browse latest Browse all 3708


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>