mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-04 23:41:45 -04:00
[microsoftstream] Add extractor (#1201)
Based on: https://github.com/ytdl-org/youtube-dl/pull/24649 Fixes: https://github.com/ytdl-org/youtube-dl/issues/24440 Authored by: damianoamatruda, nixklai
This commit is contained in:
@@ -3714,14 +3714,14 @@ def parse_resolution(s):
|
||||
if s is None:
|
||||
return {}
|
||||
|
||||
mobj = re.search(r'\b(?P<w>\d+)\s*[xX×]\s*(?P<h>\d+)\b', s)
|
||||
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')),
|
||||
'height': int(mobj.group('h')),
|
||||
}
|
||||
|
||||
mobj = re.search(r'\b(\d+)[pPiI]\b', s)
|
||||
mobj = re.search(r'(?<![a-zA-Z0-9])(\d+)[pPiI](?![a-zA-Z0-9])', s)
|
||||
if mobj:
|
||||
return {'height': int(mobj.group(1))}
|
||||
|
||||
|
Reference in New Issue
Block a user