Treat the remaining forgotten top level comments having more than 5 answers
This commit is contained in:
parent
2888f5973d
commit
6dd2f42eb9
@ -31,6 +31,7 @@ while True:
|
||||
data = getContentFromURL(f'commentThreads?part=snippet,replies&videoId={VIDEO_ID}&maxResults=100&pageToken={nextPageToken}')
|
||||
for item in data['items']:
|
||||
snippet = item['snippet']
|
||||
treatComment(snippet['topLevelComment'])
|
||||
totalReplyCount = snippet['totalReplyCount']
|
||||
if totalReplyCount > 5:
|
||||
parentId = item['id']
|
||||
@ -43,7 +44,6 @@ while True:
|
||||
break
|
||||
commentsNextPageToken = commentsData['nextPageToken']
|
||||
else:
|
||||
treatComment(snippet['topLevelComment'])
|
||||
if totalReplyCount > 0:
|
||||
for comment in item['replies']['comments']:
|
||||
treatComment(comment)
|
||||
|
Reference in New Issue
Block a user