From dada9f6db9427f0e8738ecf6551a9a0fc865bbb0 Mon Sep 17 00:00:00 2001 From: Niklas Sombert Date: Wed, 9 Oct 2019 21:46:05 +0200 Subject: [PATCH] [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. --- youtube_dl/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 859786617..4d9ee81ab 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -2750,7 +2750,7 @@ class InfoExtractor(object): # Often no height is provided but there is a label in # format like "1080p", "720p SD", or 1080. 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)) a_format = { 'url': source_url,