aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-11-13 22:29:36 +0700
committerSergey M․ <dstftw@gmail.com>2016-11-13 22:29:36 +0700
commit50913b82414488bbf625a00f1844ca84dec094dd (patch)
tree605eb404695651321e120dfa3dadc37515698b59 /youtube_dl/extractor
parent7e08e2cab02b0284e72171b3ba6b946b49f12331 (diff)
[nrk] Improve geo restriction detection
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/nrk.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/nrk.py b/youtube_dl/extractor/nrk.py
index 1f2204833..c89aac63e 100644
--- a/youtube_dl/extractor/nrk.py
+++ b/youtube_dl/extractor/nrk.py
@@ -93,8 +93,9 @@ class NRKBaseIE(InfoExtractor):
}]
if not entries:
- message_type = data.get('messageType')
- if message_type == 'ProgramIsGeoBlocked' and not self._faked_ip:
+ message_type = data.get('messageType', '')
+ # Can be ProgramIsGeoBlocked or ChannelIsGeoBlocked*
+ if 'IsGeoBlocked' in message_type and not self._faked_ip:
self.report_warning(
'Video is geo restricted, trying to fake IP')
self._fake_ip()