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.
Checklist
Verbose log
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-Jv', u'https://www.youtube.com/watch?v=BTc9jwPkCls']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.14
[debug] Python version 2.7.16 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.2.1, ffprobe 4.2.1, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: The uploader has not made this video available in your country.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 2231, in _real_extract
raise ExtractorError(error_message, expected=True)
ExtractorError: The uploader has not made this video available in your country.
Description
IIRC the Youtube Extractor used to return a list of countries the Geo-Blocked video is available in. However we are now just getting the generic "The uploader has not made this video available in your country.".
This example video is available in Japan (it's the same url/video used in our tests/issues) but we are not told which country(s) it's available in -- so I can't know which proxy to use -- which is the point of returning the countries list like it used to.
I've read the code and there is a block that checks if the youtube page has a meta tag with "Allowed Regions" that is a simple list of country codes to return. This block and it's subsequent
GeoExtractorErrorare not called, and the genericExtractorErroris returned instead w/o the countries list.For now I have to open the original Youtube page and inspect the DOM to get the Allowed Regions list but it would be nice if YTDL would return this in the error so I/we don't have to do this.
Again, I'm not sure if this is a regression, the code is there, it's a simple meta tag lookup for the countries list, not sure why it's not being triggered.
I could take a deeper look at this and find a possible fix if you're open to accepting PRs from untrusted sources.
Hopefully this could be resolved soon.
Cheers.