diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-12-17 13:46:29 -0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-12-18 23:25:45 -0500 |
commit | 43679efff5c44c41e7e8c6ca46da145becbe7c03 (patch) | |
tree | 3dc9f9c493064ed5f8c06d6d017d2723ededfefa /youtube/yt_data_extract/everything_else.py | |
parent | cf7aa4189386a4d4ffd8eb2cc80992fe1603f0c1 (diff) | |
download | yt-local-43679efff5c44c41e7e8c6ca46da145becbe7c03.tar.lz yt-local-43679efff5c44c41e7e8c6ca46da145becbe7c03.tar.xz yt-local-43679efff5c44c41e7e8c6ca46da145becbe7c03.zip |
channel: replace page #s w/ next page button using provided ctoken
Since yt doesn't accept page #'s when sorting by oldest
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/yt_data_extract/everything_else.py')
-rw-r--r-- | youtube/yt_data_extract/everything_else.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube/yt_data_extract/everything_else.py b/youtube/yt_data_extract/everything_else.py index b4b612d..ae8715f 100644 --- a/youtube/yt_data_extract/everything_else.py +++ b/youtube/yt_data_extract/everything_else.py @@ -66,6 +66,7 @@ def extract_channel_info(polymer_json, tab): # get items info['items'] = [] + info['ctoken'] = None # empty channel if 'contents' not in response and 'continuationContents' not in response: @@ -75,6 +76,7 @@ def extract_channel_info(polymer_json, tab): items, ctoken = extract_items(response) additional_info = {'author': info['channel_name'], 'author_url': info['channel_url']} info['items'] = [extract_item_info(renderer, additional_info) for renderer in items] + info['ctoken'] = ctoken if tab == 'search': info['is_last_page'] = (ctoken is None) elif tab == 'about': |