Advertisement
Guest User

Untitled

a guest
Jul 13th, 2019
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. @echo off
  2. @setlocal
  3. set start=%time%
  4. cd ***youtube-dl_directory***
  5. set output=***drive:\folder\output_directory***
  6. cls
  7. time /t
  8.  
  9. set config=***-ciw -q -f ("bestvideo[height>=2160]"/"bestvideo[height>=1440]"/"bestvideo[height>=1080][ext=mp4]"/"bestvideo[height>=720][ext=mp4]"/"bestvideo[height>=480][ext=mp4]"/"bestvideo[height>=360][ext=mp4]"/"bestvideo[ext=mp4]"/bestvideo)+bestaudio[ext=m4a]/best %url% --merge-output-format mp4 --write-all-thumbnails --buffer-size 20480 --write-info-json --add-metadata***
  10.  
  11. echo ***Youtuber01***
  12. set folder=%output%\***Youtuber01***
  13. set url=https://www.youtube.com/user/***Youtuber01***
  14. youtube-dl.exe %config% %url% -o %output%\%%(title)s.%%(ext)s --download-archive %output%\***_archived_list.txt***
  15.  
  16. echo ***Youtuber02***
  17. set folder=%output%\***Youtuber02***
  18. set url=https://www.youtube.com/playlist?list=************************************
  19. youtube-dl.exe %config% %url% -o %output%\%%(title)s.%%(ext)s --download-archive %output%\***_archived_list.txt***
  20.  
  21. echo ***Youtuber03***
  22. set folder=%output%\***Youtuber03***
  23. set url=https://www.youtube.com/channel/************************
  24. youtube-dl.exe %config% %url% -o %output%\%%(title)s.%%(ext)s --download-archive %output%\***_archived_list.txt*** ***--match-title "Podcast"***
  25.  
  26. ***etc***
  27.  
  28. echo.
  29. set end=%time%
  30. set options="tokens=1-4 delims=:.,"
  31. for /f %options% %%a in ("%start%") do set start_h=%%a&set /a start_m=100%%b %% 100&set /a start_s=100%%c %% 100&set /a start_ms=100%%d %% 100
  32. for /f %options% %%a in ("%end%") do set end_h=%%a&set /a end_m=100%%b %% 100&set /a end_s=100%%c %% 100&set /a end_ms=100%%d %% 100
  33.  
  34. set /a hours=%end_h%-%start_h%
  35. set /a mins=%end_m%-%start_m%
  36. set /a secs=%end_s%-%start_s%
  37. set /a ms=%end_ms%-%start_ms%
  38. if %ms% lss 0 set /a secs = %secs% - 1 & set /a ms = 100%ms%
  39. if %secs% lss 0 set /a mins = %mins% - 1 & set /a secs = 60%secs%
  40. if %mins% lss 0 set /a hours = %hours% - 1 & set /a mins = 60%mins%
  41. if %hours% lss 0 set /a hours = 24%hours%
  42. if 1%ms% lss 100 set ms=0%ms%
  43. :: Mission accomplished
  44. set /a totalsecs = %hours%*3600 + %mins%*60 + %secs%
  45. echo.
  46. echo.
  47. echo command took %hours%:%mins%:%secs%.%ms% (%totalsecs%.%ms%s total)
  48. echo.
  49. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement