From b5ecd0f8c2a69ee0bfc54ec95a4e1a716a9980fe Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 23 Apr 2023 14:56:25 +0000 Subject: [PATCH] fix channels with small number of videos channels with a very small amount of videos return a onResponseReceivedActions array with just 1 element instead of two. normally, [1] has the videos, and [0] has a feedFilterChipBarRenderer object, containing continuation tokens for "Latest" and "Popular". examples: UCx6cailiCkg_mlMM7JX5yfA and UCqqnIXYyT9t3as2ZBisN33g --- 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 f8a1577..136a678 100644 --- a/app/common/innertube.py +++ b/app/common/innertube.py @@ -92,7 +92,7 @@ def prepare_channel(response, channel_id, channel_name): contents|G('sectionListContinuation')|G('contents') or \ contents|G('richGridContinuation')|G('contents') or \ contents|Select('appendContinuationItemsAction')|G('continuationItems') or \ - contents|G(1)|G('reloadContinuationItemsCommand')|G('continuationItems') or [] + contents|G(-1)|G('reloadContinuationItemsCommand')|G('continuationItems') or [] items, extra = parse_channel_items(unparsed, channel_id, title) more = ( # videos, livestreams -- 2.39.3