_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.
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:
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))