mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47:54 +01:00
[common] _parse_jwplayer_formats: Accept more labels as formats
Some labels are of the form 'low quality (320p)'. This commit changes the regex so, that the whole label is searched for the number, not just the beginning.
This commit is contained in:
parent
233400f3d9
commit
dada9f6db9
@ -2750,7 +2750,7 @@ class InfoExtractor(object):
|
|||||||
# Often no height is provided but there is a label in
|
# Often no height is provided but there is a label in
|
||||||
# format like "1080p", "720p SD", or 1080.
|
# format like "1080p", "720p SD", or 1080.
|
||||||
height = int_or_none(self._search_regex(
|
height = int_or_none(self._search_regex(
|
||||||
r'^(\d{3,4})[pP]?(?:\b|$)', compat_str(source.get('label') or ''),
|
r'(\d{3,4})[pP]?(?:\b|$)', compat_str(source.get('label') or ''),
|
||||||
'height', default=None))
|
'height', default=None))
|
||||||
a_format = {
|
a_format = {
|
||||||
'url': source_url,
|
'url': source_url,
|
||||||
|
Loading…
Reference in New Issue
Block a user