mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-03 22:57:08 -05:00 
			
		
		
		
	[jwplatform] Extract height from label
This commit is contained in:
		@@ -63,10 +63,17 @@ class JWPlatformBaseIE(InfoExtractor):
 | 
				
			|||||||
                        'ext': ext,
 | 
					                        'ext': ext,
 | 
				
			||||||
                    })
 | 
					                    })
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
 | 
					                    height = int_or_none(source.get('height'))
 | 
				
			||||||
 | 
					                    if height is None:
 | 
				
			||||||
 | 
					                        # Often no height is provided but there is a label in
 | 
				
			||||||
 | 
					                        # format like 1080p.
 | 
				
			||||||
 | 
					                        height = int_or_none(self._search_regex(
 | 
				
			||||||
 | 
					                            r'^(\d{3,})[pP]$', source.get('label') or '',
 | 
				
			||||||
 | 
					                            'height', default=None))
 | 
				
			||||||
                    a_format = {
 | 
					                    a_format = {
 | 
				
			||||||
                        'url': source_url,
 | 
					                        'url': source_url,
 | 
				
			||||||
                        'width': int_or_none(source.get('width')),
 | 
					                        'width': int_or_none(source.get('width')),
 | 
				
			||||||
                        'height': int_or_none(source.get('height')),
 | 
					                        'height': height,
 | 
				
			||||||
                        'ext': ext,
 | 
					                        'ext': ext,
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    if source_url.startswith('rtmp'):
 | 
					                    if source_url.startswith('rtmp'):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user