I'm trying to write a bot that will respond to all comments under the video (1 nesting level).
all requests are made through googleapiclient
First of all, I receive last comments on channel (commentThreads => list):
request = self.client.commentThreads().list(allThreadsRelatedToChannelId=self.channel_id, moderationStatus='published', order='time', part='snippet')
Then send comment to each comment in list (comments => insert):
request = self.client.comments().insert(part='snippet', body={"snippet": {"textOriginal": text,"parentId": comment_id, } }) response = request.execute()
Full code part here
The problem is that half of the submitted comments are not showing up
(the number of comments on comments differs even though the same number of requests were sent)
No errors occur, comments just don't show up
I've tried adding a delay between requests, but that doesn't help. Nothing is written in the documentation either.
What am I doing wrong? Do I need to enable any YouTube channel settings?
Video: https://youtu.be/CXtUZtjw5Mc