Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: '-' is not a valid URL. #17556

Closed
kenichi512 opened this issue Sep 12, 2018 · 1 comment
Closed

ERROR: '-' is not a valid URL. #17556

kenichi512 opened this issue Sep 12, 2018 · 1 comment
Labels

Comments

@kenichi512
Copy link

@kenichi512 kenichi512 commented Sep 12, 2018

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 OFF
set 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.

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.pokemon.com/us/pokemon-episodes/01_08-the-path-to-the-pokemon-league/', '--hls-prefer-native', '--no-part', '--no-cache-dir', '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', '-v', '-o', 'D:\\WDL\\youtubedl\\dls\\Pokemon TV/%(series)s - %(season)s - Episode %(episode_number)s - %(episode)s.%(ext)s']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.09.10
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[Pokemon] 01_08-the-path-to-the-pokemon-league: Downloading webpage
[limelight] 04eeb06b04a346059a3be404d6213380: Downloading PlaylistService getPlaylistByMediaId JSON
[limelight] 04eeb06b04a346059a3be404d6213380: Downloading API properties JSON
[limelight] 04eeb06b04a346059a3be404d6213380: Downloading PlaylistService getMobilePlaylistByMediaId JSON
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-832 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-322 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-1072 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-1600 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-128 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-1328 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Checking http-472 URL
[limelight] 04eeb06b04a346059a3be404d6213380: Downloading m3u8 information
[debug] Invoking downloader on 'http://s2.content.video.llnw.net/smedia/4953336d7f544f678a12270b176ea386/sQ/Y4lvvI26GcvGNNKZkUj6TMwQ68Pc4SSqAZfHEvijM/0108---the-path-to-the-pokemon-league.mp4'
[download] Destination: D:\WDL\youtubedl\dls\Pokemon TV\Pokémon - Season 1 - Episode 8 - The Path to the Pokémon League.mp4
[download] 100% of 281.99MiB in 29:44
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.pokemon.com/us/pokemon-episodes/01_10-bulbasaur-and-the-hidden-village/', '--hls-prefer-native', '--no-part', '--no-cache-dir', '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', '-', '-v', '-o', 'dls/Pokemon TV/%(series)s - %(season)s - Episode %(episode_number)s - %(episode)s.%(ext)s']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.09.10
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[Pokemon] 01_10-bulbasaur-and-the-hidden-village: Downloading webpage
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Downloading PlaylistService getPlaylistByMediaId JSON
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Downloading API properties JSON
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Downloading PlaylistService getMobilePlaylistByMediaId JSON
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-1072 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-1328 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-322 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-832 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-128 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-472 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Checking http-1600 URL
[limelight] 0ef4384c906d453db0a1f04db23f4b71: Downloading m3u8 information
[debug] Invoking downloader on 'http://s2.content.video.llnw.net/smedia/4953336d7f544f678a12270b176ea386/Ok/XsVu2rOJfDXyWBmeCIldQWO7Pgz5yDl6Z1gdF0D-s/0110---bulbasaur-and-the-hidden-village.mp4'
[download] Destination: dls\Pokemon TV\Pokémon - Season 1 - Episode 10 - Bulbasaur and the Hidden Village.mp4
[download] 100% of 282.00MiB in 35:44
ERROR: '-' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:-" ) to search YouTube
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp0icdbhzn\build\youtube_dl\YoutubeDL.py", line 792, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp0icdbhzn\build\youtube_dl\extractor\common.py", line 502, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp0icdbhzn\build\youtube_dl\extractor\generic.py", line 2214, in _real_extract
youtube_dl.utils.ExtractorError: '-' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:-" ) to search YouTube
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 12, 2018

You have - before -v in your second command.

@dstftw dstftw closed this Sep 12, 2018
@dstftw dstftw added the invalid label Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.