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/go.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/go.py')
| -rw-r--r-- | youtube_dl/extractor/go.py | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/go.py b/youtube_dl/extractor/go.py index ec902c670..b205bfc7c 100644 --- a/youtube_dl/extractor/go.py +++ b/youtube_dl/extractor/go.py @@ -37,6 +37,7 @@ class GoIE(AdobePassIE):          }      }      _VALID_URL = r'https?://(?:(?P<sub_domain>%s)\.)?go\.com/(?:[^/]+/)*(?:vdka(?P<id>\w+)|season-\d+/\d+-(?P<display_id>[^/?#]+))' % '|'.join(_SITE_INFO.keys()) +    _GEO_COUNTRIES = ['US']      _TESTS = [{          'url': 'http://abc.go.com/shows/castle/video/most-recent/vdka0_g86w5onx',          'info_dict': { @@ -104,7 +105,7 @@ class GoIE(AdobePassIE):                          for error in errors:                              if error.get('code') == 1002:                                  self.raise_geo_restricted( -                                    error['message'], countries=['US']) +                                    error['message'], countries=self._GEO_COUNTRIES)                          error_message = ', '.join([error['message'] for error in errors])                          raise ExtractorError('%s said: %s' % (self.IE_NAME, error_message), expected=True)                      asset_url += '?' + entitlement['uplynkData']['sessionKey'] | 
