From b54be1593b2749a5a99442a2e39cd145a4b21012 Mon Sep 17 00:00:00 2001 From: girst Date: Fri, 12 Aug 2022 17:53:43 +0200 Subject: [PATCH] don't crash when encountering a new "View corrections" card https://support.google.com/youtube/answer/57404?hl=en https://www.theverge.com/2022/6/15/23168884/youtube-add-corrections-feature-annotations-creators?scrolla=5eb6d68b7fedc32c19ef33b4 --- app/common/innertube.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/common/innertube.py b/app/common/innertube.py index 32af1fa..7ff40f9 100644 --- a/app/common/innertube.py +++ b/app/common/innertube.py @@ -252,6 +252,8 @@ def parse_infocard(card): parses a single infocard into a format that's easier to handle. """ card = card['cardRenderer'] + if not 'content' in card: + return None # probably the "View corrections" card, ignore. ctype = list(card['content'].keys())[0] content = card['content'][ctype] if ctype == "pollRenderer": -- 2.39.3