Fix broken channel videos extraction failing with KeyError: 'gridVideoRenderer'

This commit is contained in:
Lomanic 2021-02-13 01:26:00 +01:00 committed by Cadence Ember
parent 0ae2a8a126
commit 80b41c7725
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
1 changed files with 1 additions and 1 deletions

View File

@ -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