From 6df271cf31a6bcc9ae520495951b93b7d332b61e Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 25 Jun 2023 09:22:54 +0000 Subject: [PATCH] watch: don't fail if itag specified on vevo scrambled video --- app/youtube/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/youtube/__init__.py b/app/youtube/__init__.py index 08c81ba..4b99dcd 100644 --- a/app/youtube/__init__.py +++ b/app/youtube/__init__.py @@ -99,7 +99,7 @@ def watch(): video_url, stream_map, metadata, error, errdetails = get_video_info(video_id, metaOnly=(show == 'meta')) if itag: # if itag is specified and available, force its use even if not highest resolution - video_url = next((e['url'] for e in stream_map['muxed'] if e['itag'] == int(itag)), video_url) + video_url = next((e['url'] for e in stream_map['muxed'] if 'url' in e and e['itag'] == int(itag)), video_url) proxy_on = getattr(g, 'proxy_on', None) proxy_msg = { -- 2.39.3