- Use
yarn && yarn build
to build the project. After building once you don't have to again. - Put
KEY=DEEPL_KEY
into a .env file. - Use the command
yarn start VIDEO_IDS
to start it up. VIDEO_IDS is a comma separated list of the video IDs. You can get this from the video URL or for playlists, the below script.
Paste this into browser console and pass in results.
const links = [];
document
.querySelectorAll('#items #wc-endpoint')
.forEach((x) => links.push(x.href.split('=')[1].split('&')[0]));
console.log(links.join(','));
- Add
alias yt-downloader="node ~/PROJECT_ROOT/dist"
to your .bashrc or .zshrc - Run
yt-downloader VIDEO_IDS
to download the videos and generate the subtitles