1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-21 17:51:51 +00:00

[nrk] Improve geo restriction detection

This commit is contained in:
Sergey M․ 2016-11-13 22:29:36 +07:00
parent 7e08e2cab0
commit 50913b8241
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -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()