aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/yt_data_extract/common.py
diff options
context:
space:
mode:
authorJesus E <heckyel@riseup.net>2023-05-28 21:04:36 -0400
committerJesus E <heckyel@riseup.net>2023-05-28 21:04:36 -0400
commit68752000f0213f801a7c5e8127b77afeba644f7d (patch)
treeb86637952fdd892bd41bc2f8de922116b6996c6d /youtube/yt_data_extract/common.py
parent7b60751e997137f1ce53b94b1a89e9d3dc03c729 (diff)
downloadyt-local-68752000f0213f801a7c5e8127b77afeba644f7d.tar.lz
yt-local-68752000f0213f801a7c5e8127b77afeba644f7d.tar.xz
yt-local-68752000f0213f801a7c5e8127b77afeba644f7d.zip
Update channel to new ctoken format
Huge thanks to @michaelweiser Different sortings still don't work for videos and playlists
Diffstat (limited to 'youtube/yt_data_extract/common.py')
-rw-r--r--youtube/yt_data_extract/common.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube/yt_data_extract/common.py b/youtube/yt_data_extract/common.py
index f97597c..2e59109 100644
--- a/youtube/yt_data_extract/common.py
+++ b/youtube/yt_data_extract/common.py
@@ -542,8 +542,12 @@ def extract_items(response, item_types=_item_types,
item_types=item_types)
if items:
break
- elif 'onResponseReceivedEndpoints' in response:
- for endpoint in response.get('onResponseReceivedEndpoints', []):
+ elif ('onResponseReceivedEndpoints' in response
+ or 'onResponseReceivedActions' in response):
+ for endpoint in multi_get(response,
+ 'onResponseReceivedEndpoints',
+ 'onResponseReceivedActions',
+ []):
items, ctoken = extract_items_from_renderer_list(
multi_deep_get(
endpoint,