From 03388e3ad82a84c8c98f4f07a6245598ae2d2408 Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 9 Aug 2020 12:21:01 +0200 Subject: [PATCH] found new innertube edge case --- app/common/innertube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/innertube.py b/app/common/innertube.py index 410f791..2d932d4 100644 --- a/app/common/innertube.py +++ b/app/common/innertube.py @@ -289,7 +289,7 @@ def parse_channel_items(items, channel_id, author): # only videoCardRenderer (topic channels) has author and channel, others fall back to supplied ones. result.append({'type': 'VIDEO', 'content': { 'video_id': content['videoId'], - 'title': content['title']['simpleText'], + 'title': content['title'].get('simpleText') or content['title'].get('runs',[{}])[0].get('text'), 'author': content.get('bylineText',{}).get('runs',[{}])[0].get('text') or author, 'channel_id': content.get('bylineText',{}).get('runs',[{}])[0] \ .get('navigationEndpoint',{}).get('browseEndpoint',{}).get('browseId') or channel_id, -- 2.39.3