aboutsummaryrefslogtreecommitdiff
path: root/content/download-youtube-videos.md
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-07-08 23:25:41 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-07-08 23:25:41 +0200
commitcd6644ea4ddc78597934ab0ef5ba50e3c3daa927 (patch)
tree03de331a8db6386dfd6fa75155bfbcea6b4feaf3 /content/download-youtube-videos.md
parent84ed124529ffeee1590295b8de3a8faf51848680 (diff)
downloadmitjafelicijan.com-cd6644ea4ddc78597934ab0ef5ba50e3c3daa927.tar.gz
Moved to a simpler SSG
Diffstat (limited to 'content/download-youtube-videos.md')
-rw-r--r--content/download-youtube-videos.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/content/download-youtube-videos.md b/content/download-youtube-videos.md
new file mode 100644
index 0000000..33fff05
--- /dev/null
+++ b/content/download-youtube-videos.md
@@ -0,0 +1,25 @@
1---
2title: Download list of YouTube files
3url: download-youtube-videos.html
4date: 2023-05-13T12:00:00+02:00
5type: note
6draft: false
7tags: [youtube]
8---
9
10If you need to download a list of YouTube videos and don't want to download the
11actual YouTube list (which `yt-dlp` supports), you can use the following method.
12
13```js
14// Used to get list of raw URL's from YouTube's video tab'.
15// Copy them into videos.txt.
16document.querySelectorAll('#contents a.ytd-thumbnail.style-scope.ytd-thumbnail').forEach(el => console.log(el.href))
17```
18
19Download and install https://github.com/yt-dlp/yt-dlp.
20
21```sh
22# This will download all videos in videos.txt.
23yt-dlp --batch-file videos.txt -N `nproc` -f webm
24```
25