~cadence/tube-devel

Second: Fix broken channel videos extraction failing with KeyError: 'gridVideoRenderer' v1 APPLIED

~lomanic
~lomanic: 1
 Fix broken channel videos extraction failing with KeyError: 'gridVideoRenderer'

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~cadence/tube-devel/patches/20251/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH Second] Fix broken channel videos extraction failing with KeyError: 'gridVideoRenderer' Export this patch

~lomanic
From: Lomanic <lomanic@hotmail.fr>

---
 extractors/channel.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extractors/channel.py b/extractors/channel.py
index 787a2ec..f080597 100644
--- a/extractors/channel.py
+++ b/extractors/channel.py
@@ -58,7 +58,7 @@ def extract_channel(ucid):
		# with messageRenderer.text.simpleText == "This channel has no videos."
		if "gridRenderer" in tab_parts:
			videos = (
				v["gridVideoRenderer"] for v in tab_parts["gridRenderer"]["items"]
				v["gridVideoRenderer"] for v in tab_parts["gridRenderer"]["items"] if "gridVideoRenderer" in v
			)
			for v in videos:
				live = True
-- 
2.30.0
Tested, works, and good solution. Patch applied, thank you!