mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-05 01:48:01 +09:00
[youtube] Handle empty allowed regions (Closes #6351)
This commit is contained in:
parent
420658e6cb
commit
678e436f2e
@ -993,7 +993,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
if 'reason' in video_info:
|
if 'reason' in video_info:
|
||||||
if 'The uploader has not made this video available in your country.' in video_info['reason']:
|
if 'The uploader has not made this video available in your country.' in video_info['reason']:
|
||||||
regions_allowed = self._html_search_meta('regionsAllowed', video_webpage, default=None)
|
regions_allowed = self._html_search_meta('regionsAllowed', video_webpage, default=None)
|
||||||
if regions_allowed is not None:
|
if regions_allowed:
|
||||||
raise ExtractorError('YouTube said: This video is available in %s only' % (
|
raise ExtractorError('YouTube said: This video is available in %s only' % (
|
||||||
', '.join(map(ISO3166Utils.short2full, regions_allowed.split(',')))),
|
', '.join(map(ISO3166Utils.short2full, regions_allowed.split(',')))),
|
||||||
expected=True)
|
expected=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user