From 4abcce013c9ee3053badf2abda77190233066676 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 23 Feb 2024 10:35:22 +0100 Subject: Testing thoughts page --- _posts/notes/2023-05-13-download-youtube-videos.md | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 _posts/notes/2023-05-13-download-youtube-videos.md (limited to '_posts/notes/2023-05-13-download-youtube-videos.md') diff --git a/_posts/notes/2023-05-13-download-youtube-videos.md b/_posts/notes/2023-05-13-download-youtube-videos.md new file mode 100644 index 0000000..9ed8221 --- /dev/null +++ b/_posts/notes/2023-05-13-download-youtube-videos.md @@ -0,0 +1,26 @@ +--- +title: Download list of YouTube files +permalink: /download-youtube-videos.html +date: 2023-05-13T12:00:00+02:00 +layout: post +type: note +draft: false +tags: [youtube] +--- + +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