JustPaste.it

YT-DLP helper script

@echo off
setlocal enabledelayedexpansion

REM Check if the yt-dlp location file exists
if exist ytdlp_location.txt (
  set /p ytdlp_location=<ytdlp_location.txt
) else (
  REM Ask for the yt-dlp.exe location
  set /p ytdlp_location="Add meg a yt-dlp.exe eleresi utjat (csak huzd at ide a filet):"
 
  REM Save the location to a file for future use
  echo !ytdlp_location! > ytdlp_location.txt
)

REM Ask the user what type of video they want to download
echo Mit szeretnel letolteni?
echo 1, YouTube video / TikTok video-lajfsz (alapertelmezett)
echo 2, YouTube live
echo:
REM Default option is 1 (YouTube video / TikTok video-lajfsz)
set option=1

set /p option="Ird be melyiket valasztod (Enter = alapertelmezett):"

REM Check the user's choice and set additional arguments if needed
set additional_args=
if "%option%"=="2" (
  set additional_args=--live-from-start
)
echo:
REM Ask for the YouTube Live URL
set /p youtube_url="Add meg a letoltendo URL-t:"
echo:
REM Run the yt-dlp command with the provided URL and additional arguments
!ytdlp_location! %additional_args% !youtube_url!

REM Pause to keep the command window open
echo:
@echo off
echo     **********     
echo    *   SODI   *  
echo   *    EGY     *  
echo  *   MOCSKOS    *  
echo  *   PEDOFIL    * 
echo   *  BUZERANS  * 
echo    *          *  
echo      ********     
echo:
pause