diff --git a/search_in_youtube_video_comments.py b/search_in_youtube_video_comments.py index 1d8a8ca..b4c3c29 100755 --- a/search_in_youtube_video_comments.py +++ b/search_in_youtube_video_comments.py @@ -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)