0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-24 02:35:12 +00:00

[extractor/common] Do not quit _initialize_geo_bypass on empty countries

This commit is contained in:
Sergey M․ 2017-02-21 23:09:41 +07:00
parent dc0a869e5e
commit 336a76551b
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -393,7 +393,6 @@ def _initialize_geo_bypass(self, countries):
is selected and a random IP belonging to this country is generated. This
IP will be passed as X-Forwarded-For HTTP header in all subsequent
HTTP requests.
Method does nothing if no countries are specified.
This method will be used for initial geo bypass mechanism initialization
during the instance initialization with _GEO_COUNTRIES.
@ -402,8 +401,6 @@ def _initialize_geo_bypass(self, countries):
information is not available beforehand (e.g. obtained during
extraction) or due to some another reason.
"""
if not countries:
return
if not self._x_forwarded_for_ip:
country_code = self._downloader.params.get('geo_bypass_country', None)
# If there is no explicit country for geo bypass specified and