aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-07-25 02:09:34 +0600
committerSergey M․ <dstftw@gmail.com>2015-07-25 02:09:34 +0600
commit678e436f2e77f1ae3a57c4b5d1fc3d74342ab412 (patch)
treedd41f0bdb8f8daa9a21d069072e20ab5a5c9b5a6 /youtube_dl/extractor/youtube.py
parent420658e6cb80ff9687accebe08bc1af5953fae21 (diff)
downloadyoutube-dl-678e436f2e77f1ae3a57c4b5d1fc3d74342ab412.tar.xz
[youtube] Handle empty allowed regions (Closes #6351)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 229fc3a0f..4023a6e50 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -993,7 +993,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if 'reason' in video_info:
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)
- if regions_allowed is not None:
+ if regions_allowed:
raise ExtractorError('YouTube said: This video is available in %s only' % (
', '.join(map(ISO3166Utils.short2full, regions_allowed.split(',')))),
expected=True)