mirror of
				https://github.com/ytdl-org/youtube-dl.git
				synced 2025-10-29 09:26:20 -07:00 
			
		
		
		
	[ITV] Fix UA capitalisation in 384f632
				
					
				
			This commit is contained in:
		| @@ -59,7 +59,7 @@ class ITVBaseIE(InfoExtractor): | |||||||
|  |  | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def _vanilla_ua_header(): |     def _vanilla_ua_header(): | ||||||
|         return {'User-agent': 'Mozilla/5.0'} |         return {'User-Agent': 'Mozilla/5.0'} | ||||||
|  |  | ||||||
|     def _download_webpage_handle(self, url, video_id, *args, **kwargs): |     def _download_webpage_handle(self, url, video_id, *args, **kwargs): | ||||||
|         # specialised to (a) use vanilla UA (b) detect geo-block |         # specialised to (a) use vanilla UA (b) detect geo-block | ||||||
| @@ -69,7 +69,7 @@ class ITVBaseIE(InfoExtractor): | |||||||
|                 'user_agent' not in params |                 'user_agent' not in params | ||||||
|                 and not any(re.match(r'(?i)user-agent\s*:', h) |                 and not any(re.match(r'(?i)user-agent\s*:', h) | ||||||
|                             for h in (params.get('headers') or [])) |                             for h in (params.get('headers') or [])) | ||||||
|                 and 'User-agent' not in (kwargs.get('headers') or {})): |                 and 'User-Agent' not in (kwargs.get('headers') or {})): | ||||||
|  |  | ||||||
|             kwargs.setdefault('headers', {}) |             kwargs.setdefault('headers', {}) | ||||||
|             kwargs['headers'] = self._vanilla_ua_header() |             kwargs['headers'] = self._vanilla_ua_header() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user