def __maybe_fake_ip_and_retry(self, countries):
    if ((not self._downloader.params.get('geo_bypass_country', None)) and self._GEO_BYPASS and self._downloader.params.get('geo_bypass', True) and (not self._x_forwarded_for_ip) and countries):
        country_code = random.choice(countries)
        self._x_forwarded_for_ip = GeoUtils.random_ipv4(country_code)
        if self._x_forwarded_for_ip:
            self.report_warning(('Video is geo restricted. Retrying extraction with fake IP %s (%s) as X-Forwarded-For.' % (self._x_forwarded_for_ip, country_code.upper())))
            return True
    return False
def __maybe_fake_ip_and_retry(self, countries):
    if ((not self._downloader.params.get('geo_bypass_country', None)) and self._GEO_BYPASS and self._downloader.params.get('geo_bypass', True) and (not self._x_forwarded_for_ip) and countries):
        country_code = random.choice(countries)
        self._x_forwarded_for_ip = GeoUtils.random_ipv4(country_code)
        if self._x_forwarded_for_ip:
            self.report_warning(('Video is geo restricted. Retrying extraction with fake IP %s (%s) as X-Forwarded-For.' % (self._x_forwarded_for_ip, country_code.upper())))
            return True
    return False