From 97750eb49868de82b4dfb29013096b2c059fbe49 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Wed, 5 Jul 2023 23:20:15 +0200 Subject: [PATCH] Add a comment about `if totalReplyCount > 0` condition --- search_in_youtube_video_comments.py | 1 + 1 file changed, 1 insertion(+) diff --git a/search_in_youtube_video_comments.py b/search_in_youtube_video_comments.py index cb7db2b..fc8c540 100755 --- a/search_in_youtube_video_comments.py +++ b/search_in_youtube_video_comments.py @@ -44,6 +44,7 @@ while True: break commentsNextPageToken = commentsData['nextPageToken'] else: + # This condition is to manage properly `item`s without `replies` entry. if totalReplyCount > 0: for comment in item['replies']['comments']: treatComment(comment)