Inspired by Tom Scott's video, this YouTube title and thumbnail updater was created for my kid's YouTube video. As shown below in this live screenshot demonstration that displays the latest view and like counts:
- Node.js. Find the latest version here: https://nodejs.org/en/download/
- YouTube API OAuth credentials. Follow steps 1 and 2 of the Node.js Quickstart guide.
-
Download the YouTube Retitler Git repository and change to the directory:
git clone https://github.com/meltaxa/youtube-retitler.git cd youtube-retitler
-
Copy your YouTube API credentials json file into the directory.
-
Copy the example config file and update it accordingly.
cp config.js-example config.js
-
Install required Node packages:
npm install
-
Run the retitler main script:
node main.js
-
As per step 4 of the YouTube API guide, on the initial run, you will be prompted to authorize access for the program. Follow the instructions.
Use a scheduler such as cron to check and make title updates automatically. For example,
# Update a YouTube video title every minute.
* * * * * cd /path/to/youtube-retitler; node main.js
The YouTube Data API has a default quota allocation of 10,000 units per day. API methods have different costs, for example the API video.list method is 1 API unit cost. Updating the title costs 50 API units. In the example cron schedule, it will cost at least 1440 API units to check the video view and like counts, which leaves 8560 units for updates. An update costs 100 units (50 each for video.update and thumbnails.set API method). After 85 title updates, the quota will be exceeded for the day.