diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-02-19 03:53:23 +0700 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2017-02-19 05:10:08 +0800 |
commit | 4248dad92bd87650c791194276296b148f668e68 (patch) | |
tree | e4c26e41802f4119b67830a61976c39c494b377e /youtube_dl/extractor/nrk.py | |
parent | 0a840f584c3f1fedb6957c05587dec697143f2d5 (diff) |
Improve geo bypass mechanism
* Rename options to preffixly match with --geo-verification-proxy
* Introduce _GEO_COUNTRIES for extractors
* Implement faking IP right away for sites with known geo restriction
Diffstat (limited to 'youtube_dl/extractor/nrk.py')
-rw-r--r-- | youtube_dl/extractor/nrk.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/nrk.py b/youtube_dl/extractor/nrk.py index 78ece33e1..13af9ed1f 100644 --- a/youtube_dl/extractor/nrk.py +++ b/youtube_dl/extractor/nrk.py @@ -14,6 +14,7 @@ from ..utils import ( class NRKBaseIE(InfoExtractor): + _GEO_COUNTRIES = ['NO'] def _real_extract(self, url): video_id = self._match_id(url) @@ -93,7 +94,8 @@ class NRKBaseIE(InfoExtractor): # Can be ProgramIsGeoBlocked or ChannelIsGeoBlocked* if 'IsGeoBlocked' in message_type: self.raise_geo_restricted( - msg=MESSAGES.get('ProgramIsGeoBlocked'), countries=['NO']) + msg=MESSAGES.get('ProgramIsGeoBlocked'), + countries=self._GEO_COUNTRIES) raise ExtractorError( '%s said: %s' % (self.IE_NAME, MESSAGES.get( message_type, message_type)), |