mirror of
				https://github.com/ytdl-org/youtube-dl.git
				synced 2025-10-29 09:26:20 -07:00 
			
		
		
		
	[extractor/common] Do not quit _initialize_geo_bypass on empty countries
This commit is contained in:
		| @@ -393,7 +393,6 @@ class InfoExtractor(object): | |||||||
|         is selected and a random IP belonging to this country is generated. This |         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 |         IP will be passed as X-Forwarded-For HTTP header in all subsequent | ||||||
|         HTTP requests. |         HTTP requests. | ||||||
|         Method does nothing if no countries are specified. |  | ||||||
|  |  | ||||||
|         This method will be used for initial geo bypass mechanism initialization |         This method will be used for initial geo bypass mechanism initialization | ||||||
|         during the instance initialization with _GEO_COUNTRIES. |         during the instance initialization with _GEO_COUNTRIES. | ||||||
| @@ -402,8 +401,6 @@ class InfoExtractor(object): | |||||||
|         information is not available beforehand (e.g. obtained during |         information is not available beforehand (e.g. obtained during | ||||||
|         extraction) or due to some another reason. |         extraction) or due to some another reason. | ||||||
|         """ |         """ | ||||||
|         if not countries: |  | ||||||
|             return |  | ||||||
|         if not self._x_forwarded_for_ip: |         if not self._x_forwarded_for_ip: | ||||||
|             country_code = self._downloader.params.get('geo_bypass_country', None) |             country_code = self._downloader.params.get('geo_bypass_country', None) | ||||||
|             # If there is no explicit country for geo bypass specified and |             # If there is no explicit country for geo bypass specified and | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user