projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e08e2c
)
[nrk] Improve geo restriction detection
author
Sergey M․
<dstftw@gmail.com>
Sun, 13 Nov 2016 15:29:36 +0000
(22:29 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 13 Nov 2016 15:29:36 +0000
(22:29 +0700)
youtube_dl/extractor/nrk.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/nrk.py
b/youtube_dl/extractor/nrk.py
index 1f2204833acceb8fb39e2b3731d156438451dc98..c89aac63ee90f133074d8ade8b7af23cf020f148 100644
(file)
--- 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()