From 1100562e29f6476448b656dbddd4cf22505523f6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 10 Mar 2024 14:59:14 +0100 Subject: Move back to JBMAFP --- .../notes/2023-05-13-download-youtube-videos.md | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 content/notes/2023-05-13-download-youtube-videos.md (limited to 'content/notes/2023-05-13-download-youtube-videos.md') diff --git a/content/notes/2023-05-13-download-youtube-videos.md b/content/notes/2023-05-13-download-youtube-videos.md new file mode 100644 index 0000000..2ac6e76 --- /dev/null +++ b/content/notes/2023-05-13-download-youtube-videos.md @@ -0,0 +1,24 @@ +--- +title: Download list of YouTube files +url: /download-youtube-videos.html +date: 2023-05-13T12:00:00+02:00 +type: note +draft: false +--- + +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. + +```js +// 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. + +```sh +# This will download all videos in videos.txt. +yt-dlp --batch-file videos.txt -N `nproc` -f webm +``` + -- cgit v1.2.3