Download list of YouTube files

note, May 13, 2023, on Mitja Felicijan's blog

If you need to download a list of YouTube videos and don't want to download the actual YouTube list (which yt-dlp supports), you can use the following method.

// Used to get list of raw URL's from YouTube's video tab'.
// Copy them into videos.txt.
document.querySelectorAll('#contents a.ytd-thumbnail.style-scope.ytd-thumbnail').forEach(el => console.log(el.href))

Download and install https://github.com/yt-dlp/yt-dlp.

# This will download all videos in videos.txt.
yt-dlp --batch-file videos.txt -N `nproc` -f webm

Other notes

DateTitle
Personal sane Vim defaultsvim
Calling assembly functions from Cc
10/GUI 10 Finger Multitouch User Interface
Execute not blocking async shell command in C#
Run 9front in Qemuplan9
Online radio streaming with MPV from terminal
Change permissions of matching files recursively
Easy measure time took in a bash script
Convert all MKV files into other formats
Minimal desktop setup with cwm and conky
Aerial photography of algae spotted on river Sava
60's IBM Computers Commercial
Sane default for Dungeon Crawl Stone Soup Online editiondcss
Download list of YouTube files
Cache busting in Hugo