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

Display JSON for videos with only some regions allowed #5716

Open
benoon opened this issue May 15, 2015 · 2 comments
Open

Display JSON for videos with only some regions allowed #5716

benoon opened this issue May 15, 2015 · 2 comments
Labels

Comments

@benoon
Copy link

benoon commented May 15, 2015

ex.:
./youtube-dl -j https://www.youtube.com/watch?v=JTIBV-86Pt0
ERROR: JTIBV-86Pt0: YouTube said: The uploader has not made this video available in your country.

When you look at the page source metas:
<meta itemprop="regionsAllowed" content="AR,BO,CL,CO,DO,EC,PE,PR,PY,US,UY,VE">

It would be great if instead of ERROR, the json output would give the array of allowed countries so you can use a proper proxy for a second try.

@jaimeMF
Copy link
Collaborator

jaimeMF commented May 15, 2015

The -j is supposed to only return valid video results and I think we should keep that behaviour. Outputting the list of regions allowed could be a good idea.

@benoon
Copy link
Author

benoon commented May 15, 2015

I agree but giving JSON with video status is better than ERROR.
Actually JSON should be outputted always instead of ERROR. It's not an error when the video is removed, private or available only for some regions. It's a value info which should have a json format.

{"video_status":"private"}

{"video_status":"region","regions":["AR","BO","CL","CO","DO","EC","PE","PR","PY","US","UY","VE"]}

and so on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants