mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[niconico] Fix extraction of thumbnails and uploader (#3266)
This commit is contained in:
		 Lesmiscore (Naoya Ozaki)
					Lesmiscore (Naoya Ozaki)
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							e6f868a63c
						
					
				
				
					commit
					5d45484cc7
				
			| @@ -2418,11 +2418,14 @@ def parse_count(s): | ||||
|         return str_to_int(mobj.group(1)) | ||||
|  | ||||
|  | ||||
| def parse_resolution(s): | ||||
| def parse_resolution(s, *, lenient=False): | ||||
|     if s is None: | ||||
|         return {} | ||||
|  | ||||
|     mobj = re.search(r'(?<![a-zA-Z0-9])(?P<w>\d+)\s*[xX×,]\s*(?P<h>\d+)(?![a-zA-Z0-9])', s) | ||||
|     if lenient: | ||||
|         mobj = re.search(r'(?P<w>\d+)\s*[xX×,]\s*(?P<h>\d+)', s) | ||||
|     else: | ||||
|         mobj = re.search(r'(?<![a-zA-Z0-9])(?P<w>\d+)\s*[xX×,]\s*(?P<h>\d+)(?![a-zA-Z0-9])', s) | ||||
|     if mobj: | ||||
|         return { | ||||
|             'width': int(mobj.group('w')), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user