Skip to content

Commit 42c8330

Browse files
author
0xfab1
committed
update
1 parent bab93da commit 42c8330

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

docs/tech/cloud/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Cloud Overview
22

3-
TODO
3+
TODO

docs/tech/tools/yt-dlp.md

+27-25
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,30 @@ Download with details:
2929
yt-dlp.exe -f best --write-description --write-info-json --write-annotations --write-sub --write-thumbnail 'link'
3030
```
3131

32-
## Audio only
33-
34-
``` sh
35-
yt-dlp.exe -i --extract-audio --audio-format mp3 --audio-quality 0 'link'
36-
```
32+
To download all videos mentioned on a given website use the following regex to find youtube links:
3733

38-
## YouTube Playlists
34+
Regex for videos: `youtube\.com\/watch\?v=[A-Za-z0-9-_]{11}`
35+
Regex for playlists: `youtube\.com\/playlist\?list=[A-Za-z0-9_-]{34}`
3936

40-
Download a playlist:
37+
We can now curl the given page (example here is <https://cs1000.vercel.app>) and append all found links to `download.txt`
4138

4239
``` sh
43-
yt-dlp.exe -best 22 --yes-playlist 'link'
40+
curl -s https://cs1000.vercel.app | grep -ioE "youtube\.com\/watch\?v=[A-Za-z0-9]{11}" > download.txt
41+
curl -s https://cs1000.vercel.app | grep -ioE "youtube\.com\/playlist\?list=[A-Za-z0-9_-]{34}" >> download.txt
4442
```
4543

46-
Download a playlist with audio only:
44+
To download all videos and playlists listed in `download.txt` we can now run the following command. This will also put all playlist videos in an own subfolder:
4745

4846
``` sh
49-
yt-dlp.exe -f 22 --yes-playlist 'link'
47+
yt-dlp.exe --batch-file download.txt -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' "${line}"
5048
```
5149

52-
## Get Video Source Information
53-
54-
Get Source formats available:
50+
## Audio only
5551

5652
``` sh
57-
yt-dlp.exe --list-formats 'link'
53+
yt-dlp.exe -i --extract-audio --audio-format mp3 --audio-quality 0 'link'
5854
```
5955

60-
## Download audio of a playlist
61-
6256
This script will download the latest yt-dlp.exe version for windows to the current folder if not available.
6357

6458
``` ps1
@@ -74,22 +68,30 @@ Function ytdlpl
7468
}
7569
```
7670

77-
## Download all videos of a list
71+
## YouTube Playlists
7872

79-
To download all videos mentioned on a given website use the following regex to find youtube links:
73+
Download a playlist:
8074

81-
Regex for videos: `youtube\.com\/watch\?v=[A-Za-z0-9-_]{11}`
82-
Regex for playlists: `youtube\.com\/playlist\?list=[A-Za-z0-9_-]{34}`
75+
``` sh
76+
yt-dlp.exe -best 22 --yes-playlist 'link'
77+
```
8378

84-
We can now curl the given page (example here is <https://cs1000.vercel.app>) and append all found links to `download.txt`
79+
Download a playlist with audio only:
8580

8681
``` sh
87-
curl -s https://cs1000.vercel.app | grep -ioE "youtube\.com\/watch\?v=[A-Za-z0-9]{11}" > download.txt
88-
curl -s https://cs1000.vercel.app | grep -ioE "youtube\.com\/playlist\?list=[A-Za-z0-9_-]{34}" >> download.txt
82+
yt-dlp.exe -f 22 --yes-playlist 'link'
8983
```
9084

91-
To download all videos and playlists listed in `download.txt` we can now run the following command. This will also put all playlist videos in an own subfolder:
85+
## Get additional Video Information
86+
87+
Get Source formats available:
9288

9389
``` sh
94-
yt-dlp.exe --batch-file download.txt -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' "${line}"
90+
yt-dlp.exe --list-formats 'link'
91+
```
92+
93+
Download subtitles:
94+
95+
``` sh
96+
yt-dlp --write-sub --sub-lang "en.*" --write-auto-sub --skip-download "link"
9597
```

0 commit comments

Comments
 (0)