commit 50913b82414488bbf625a00f1844ca84dec094dd parent 7e08e2cab02b0284e72171b3ba6b946b49f12331 Author: Sergey M․ <dstftw@gmail.com> Date: Sun, 13 Nov 2016 22:29:36 +0700 [nrk] Improve geo restriction detection Diffstat:
M | youtube_dl/extractor/nrk.py | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git 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()