@@ -29,36 +29,30 @@ Download with details:
29
29
yt-dlp.exe -f best --write-description --write-info-json --write-annotations --write-sub --write-thumbnail ' link'
30
30
```
31
31
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:
37
33
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} `
39
36
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 `
41
38
42
39
``` 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
44
42
```
45
43
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 :
47
45
48
46
``` 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} "
50
48
```
51
49
52
- ## Get Video Source Information
53
-
54
- Get Source formats available:
50
+ ## Audio only
55
51
56
52
``` sh
57
- yt-dlp.exe --list-formats ' link'
53
+ yt-dlp.exe -i --extract-audio --audio-format mp3 --audio-quality 0 ' link'
58
54
```
59
55
60
- ## Download audio of a playlist
61
-
62
56
This script will download the latest yt-dlp.exe version for windows to the current folder if not available.
63
57
64
58
``` ps1
@@ -74,22 +68,30 @@ Function ytdlpl
74
68
}
75
69
```
76
70
77
- ## Download all videos of a list
71
+ ## YouTube Playlists
78
72
79
- To download all videos mentioned on a given website use the following regex to find youtube links :
73
+ Download a playlist :
80
74
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
+ ```
83
78
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:
85
80
86
81
``` 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'
89
83
```
90
84
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:
92
88
93
89
``` 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"
95
97
```
0 commit comments