Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
ERROR: '-' is not a valid URL. #17556
Comments
|
You have |
These days I have been reordering file directories in the following way.
D:\WDL\youtubedl\batchfiles (folder where I will only have batch files
D:\WDL\youtubedl\dls (folder with subfolders that will have only downloads)
D:\WDL\youtubedl\ytdl (program folder and complements)
I had to remove spaces and special characters due to problems in the set paths
Set each path and run the batch from a different path of youtube-dl.exe without so many errors it has been complicated because the conditions of download in each site vary and I have to use different codes for each site. However, this also means that not all downloads are directed to the set path (especially when several links are downloaded) and instead, youtube-dl creates the folders of download directory inside the batch files's folder.
This is a "standard" download code that I use
@ECHO OFFset youtube-dl=%~d0\WDL\youtubedl\ytdl\youtube-dl.exe
set "outputfile=%~d0\WDL\youtubedl\dls\site"
if not exist "%outputfile%" (mkdir "%outputfile%")
%youtube-dl% "URL" --hls-prefer-native --no-part --no-cache-dir -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best -v -o "%outputfile%/%%(title)s.%%(ext)s"
ECHO Press any key to exit. . .
PAUSE>NUL
EXIT
If I try to download several consecutive links from YouTube (suppose 10 links), all files are directed to the set path. But if I try to download from the Pokémon website, only the first link is downloaded in the set path, the rest of the links are downloaded into the folder of batch files and present an error message in prompt.