A Python script to get rid of negative comments for your YouTube video.
The program does the following:
-
Get my recent videos
-
List all comments for a video (include comment text and id)
-
For each comment, check positivity using chatgpt (return yes or no)
-
delete any negative comment using comment id.
You need the following two authentication methods:
- An API key to authenticate to ChatGPT API.
- A client secrets json file to authenticate to YouTube API that uses OAuth 2.0.
To run the script:
python3 youtube.py