mirror of
				https://code.hackerspace.pl/q3k/youtube-dl
				synced 2025-03-16 11:43:02 +00:00 
			
		
		
		
	Deal with implicitly UTF-16 decoded webpages
These webpages don't specify an encoding and rely on the BOM
This commit is contained in:
		
							parent
							
								
									5aafe895fc
								
							
						
					
					
						commit
						b60016e831
					
				| @ -220,6 +220,8 @@ class InfoExtractor(object): | ||||
|                           webpage_bytes[:1024]) | ||||
|             if m: | ||||
|                 encoding = m.group(1).decode('ascii') | ||||
|             elif webpage_bytes.startswith(b'\xff\xfe'): | ||||
|                 encoding = 'utf-16' | ||||
|             else: | ||||
|                 encoding = 'utf-8' | ||||
|         if self._downloader.params.get('dump_intermediate_pages', False): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Philipp Hagemeister
						Philipp Hagemeister