diff options
author | Damiano Amatruda <damiano.amatruda@outlook.com> | 2021-10-22 02:04:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 05:34:00 +0530 |
commit | 17ec8bcfa90b80913072fdcb0cafc09c1ad79849 (patch) | |
tree | 9fd20e09bbe43c0c4f74fb67c07b0ce8020938ed /yt_dlp/utils.py | |
parent | 0f6e60bb5722f03c6b64712f70aaf9b0b6915795 (diff) | |
download | hypervideo-pre-17ec8bcfa90b80913072fdcb0cafc09c1ad79849.tar.lz hypervideo-pre-17ec8bcfa90b80913072fdcb0cafc09c1ad79849.tar.xz hypervideo-pre-17ec8bcfa90b80913072fdcb0cafc09c1ad79849.zip |
[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
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 319f6979b..e05677d08 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -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))} |