Skip non-integer youtube formats.

This commit is contained in:
auouymous 2021-07-07 01:59:41 -06:00
parent 79ef6aa8a2
commit 6e48992b31

View file

@ -295,8 +295,8 @@ def get_real_download_url(url, allow_partial, preferred_fmt_ids=None):
fmt_id_url_map = dict(fmt_id_url_map) fmt_id_url_map = dict(fmt_id_url_map)
for id in preferred_fmt_ids: for id in preferred_fmt_ids:
if re.search(r'(^best|\+)', str(id)): if not re.search(r'^[0-9]+$', str(id)):
# skip formats that contain 'best.*' or a + (136+140) # skip non-integer formats 'best', '136+140' or twitch '720p'
continue continue
id = int(id) id = int(id)
if id in formats_available: if id in formats_available: