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.
[Question] Error: '' is not a valid URL #12994
Comments
|
|
So i have a script where i using youtube_dl and all is fully working, but for users i need to make it more easy to understand, i want to do 1 message for all errors and details will be in log file, i did some exceptions but i have 1 i don't understand and that what i explain above. So if you still don't understand, i did error for purpose ( i insert not a link just a random word ) and it's gave me my except message and some weird message:
Also there is my code, look if you want but it has russian language, try to translate. |
|
It gives you exactly what it's supposed to give. A random word or an empty string is an invalid URL that is clearly stated in the error message. In case of user meant a search query by such random word there is an explanation that he may use |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.05.01. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add
-vflag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
Description of your issue, suggested solution and other information
Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
How to find this exception "ERROR: '' is not a valid URL..... ", for some exceptions i made this
except (youtube_dl.utils.DownloadError,youtube_dl.utils.ContentTooShortError,youtube_dl.utils.ExtractorError,youtube_dl.utils.RegexNotFoundError) as e: print('error?')Copy link and press ENTER
Press Ctrl+C to stop downloading
ERROR: '' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:da" ) to search YouTube
error?