aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-19 01:53:41 +0700
committerSergey M <dstftw@gmail.com>2017-02-19 05:10:08 +0800
commit0a840f584c3f1fedb6957c05587dec697143f2d5 (patch)
tree553633b925896d96c2224f65922a73ff38f6f27a /youtube_dl/extractor/common.py
parent0016b84e16965a07c52946c4672363153e8b18a2 (diff)
downloadyoutube-dl-0a840f584c3f1fedb6957c05587dec697143f2d5.tar.xz
Rename bypass geo restriction options
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index c1f7f28a0..6eb6a25b8 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -326,7 +326,7 @@ class InfoExtractor(object):
_BYPASS_GEO attribute may be set to False in order to disable
geo restriction bypass mechanisms for a particular extractor.
Though it won't disable explicit geo restriction bypass based on
- country code provided with bypass_geo_restriction_as_country.
+ country code provided with geo_bypass_country.
Finally, the _WORKING attribute should be set to False for broken IEs
in order to warn the users and skip the tests.
@@ -371,7 +371,7 @@ class InfoExtractor(object):
def initialize(self):
"""Initializes an instance (authentication, etc)."""
if not self._x_forwarded_for_ip:
- country_code = self._downloader.params.get('bypass_geo_restriction_as_country', None)
+ country_code = self._downloader.params.get('geo_bypass_country', None)
if country_code:
self._x_forwarded_for_ip = GeoUtils.random_ipv4(country_code)
if not self._ready:
@@ -389,9 +389,9 @@ class InfoExtractor(object):
ie_result['__x_forwarded_for_ip'] = self._x_forwarded_for_ip
return ie_result
except GeoRestrictedError as e:
- if (not self._downloader.params.get('bypass_geo_restriction_as_country', None) and
+ if (not self._downloader.params.get('geo_bypass_country', None) and
self._BYPASS_GEO and
- self._downloader.params.get('bypass_geo_restriction', True) and
+ self._downloader.params.get('geo_bypass', True) and
not self._x_forwarded_for_ip and
e.countries):
self._x_forwarded_for_ip = GeoUtils.random_ipv4(random.choice(e.countries))