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.
return specific error when video blocked on copyright grounds (python lib) #7509
Comments
|
Post an example URL, and how you are calling youtube-dl (ideally the minimum code to reproduce it) |
|
code to reproduce https://gist.github.com/dattaz/80c94db5d22b2bb5b96f |
|
=> example of use case https://gist.github.com/dattaz/d17fc77bc30ba98e11b1 |
|
Post the output of script execution. |
except youtube_dl.utils.DownloadError as e:
print(repr(e.exc_info[1]))gives |
|
output : https://gist.github.com/dattaz/982281ec9eff0aa83533 sorry for indentation, i use python 2.x but no report about using from future import unicode_literals can we know all cause for ExtractorError ? because other url (also blocked) show a different message...that why i think having a specific error can be a good idea |
|
There are a lot of possible error messages (georestriction, removed due to copyright, removed by the user, temporary problems ...). I don't think we can accurately classify them. As I said if you get the original exception, you can get the |
actually it's return a generic error : youtube_dl.utils.DownloadError (same as no internet connection for example)
it's will be useful to have a specific error, something like youtube_dl.utils.BlockedCopyright