Using the Youtube API and Python to update view count on Youtube video to:
Achieve the "This Video Has X Views" Title
Enable video's title to be the most recent comment
and More!
Get setup with the Youtube API: https://developers.google.com/youtube/v3/quickstart/python
Be sure to follow it carefully, as it won't work if you don't do this part right.
Save the Google Oauth Client File from Step 1 into a file named "secret.json"
Download code from Github and in the program you want to run (yt_view_counter.py for view counter, yt_comment_vid.py for comment updater) \
- Replace client_secrets_file with your new "secret.json"
- Replace the id's with the id of the video you want to edit
Setup pip on Windows: https://www.liquidweb.com/kb/install-pip-windows/
In terminal / command line, run the program with
pip install google-auth-oauthlib
pip install google-api-python-client
In terminal / command line, run the program with
python yt_view_counter.py
The Youtube API will give you a link to get authenticated. Go to this link, and if you get "Website is not secure", just hit "Advanced" and keep going to get your authentication code.