Updates youtube title to match with views count and others
Make sure you have Node.js installed (LTS is recommended)
Clone or download this repository and install dependencies
git clone https://github.com/Podter/youtube-update-title.git
cd youtube-update-title
npm install
Download and rename the OAuth Client ID JSON file to client_secret.json
and put in the folder (you can see how to do it here)
Rename config_example.json
to config.json
and put your video id there
{
"id": "dQw4w9WgXcQ"
}
Now let's login and generate access token user_credential.json
npm run auth
You should get something like this
Open in browser and select your account
And it's time to do some testing (optional)
npm run getvideo # Get video info
npm run update1 # Update title to "hello world!"
npm run update2 # Update title to "i have ... views"
Time to modify some codes (optional)
// index.ts at line 43
newVideoTitle = `i have ${views} views, ${likes} likes, ${dislikes} dislikes and ${comments} comments.`; // change video title here
Finally, build and run the code
npm run build
npm start
Just run this and app can't access to your account anymore
npm run revoke
Follow these steps above and then build the docker image
npm run build:docker
# or
docker build -t youtube-update-title .
and then run it
npm run start:docker
# or
docker run -d --name youtube-update-title --restart unless-stopped youtube-update-title
You don't need to do anything else because configs (.json files) already built into the image
Note: You have to rebuild image everytime when token is expired or you just make some changes
Never push this repository or built Docker image with client_secret.json
, user_credential.json
or you will expose your account credential! (if someone have those files, they can do anything with your youtube account! like change your channel name or delete some videos)
If you accdient did it, immediately revoke the credential and regenerate OAuth Client ID JSON file!