-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdl.bat
82 lines (73 loc) · 1.54 KB
/
dl.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@echo off
setlocal enabledelayedexpansion
echo ----- YouTube Bulk Downloader -----
echo ----- by EDM115 -----
echo.
echo.
echo ----- Checking required files... -----
echo.
if not exist yt-dlp.exe (
echo yt-dlp.exe not found !
echo Exiting now...
pause
endlocal
exit /b
)
if not exist ffmpeg.exe (
echo ffmpeg.exe not found !
echo Exiting now...
pause
endlocal
exit /b
)
if not exist ffprobe.exe (
echo ffprobe.exe not found !
echo Exiting now...
pause
endlocal
exit /b
)
if not exist yt.txt (
echo yt.txt not found !
echo Exiting now...
pause
endlocal
exit /b
)
echo ----- Required files found -----
echo.
echo ----- Parsing the yt.txt file... -----
echo.
set count=0
for /f "delims=" %%a in (yt.txt) do (
if "%%a" neq "[" if "%%a" neq "]" (
set /a count+=1
set "url[!count!]=%%a"
)
)
if %count% EQU 0 (
echo No URLs found in yt.txt !
pause
endlocal
exit /b
)
echo ----- %count% links found ! -----
echo.
for /l %%i in (1,1,%count%) do (
echo ----- Processing string %%i/%count%... -----
echo.
set "current_url=!url[%%i]!"
set "current_url=!current_url:"=!"
set "current_url=!current_url:,=!"
yt-dlp.exe --ffmpeg-location "ffmpeg.exe" -f bestvideo+bestaudio/best --embed-subs --embed-thumbnail --embed-metadata --no-playlist -o "downloads\%%(title)s [%%(id)s].%%(ext)s" !current_url!
echo.
)
echo ----- Download done ! -----
echo Your files are in the downloads folder
echo.
echo Follow me on GitHub :
echo https://github.com/EDM115
echo.
pause
endlocal
exit /b