diff options
author | Astound <kirito@disroot.org> | 2024-01-22 05:52:44 +0800 |
---|---|---|
committer | Astound <kirito@disroot.org> | 2024-01-22 05:52:44 +0800 |
commit | 2140f489192f98284811e7cbaba8b6fa0e552bf7 (patch) | |
tree | 32f04b25489e1227b5cadb29ee8db49ebc3dbb2a /youtube/playlist.py | |
parent | 4be01d39647dd3761710dc75ed2fd326f17b8580 (diff) | |
download | yt-local-2140f489192f98284811e7cbaba8b6fa0e552bf7.tar.lz yt-local-2140f489192f98284811e7cbaba8b6fa0e552bf7.tar.xz yt-local-2140f489192f98284811e7cbaba8b6fa0e552bf7.zip |
Subscriptions: Use playlist method to get channel videos
Use the UU (user uploads) playlist since it includes streams
Diffstat (limited to 'youtube/playlist.py')
-rw-r--r-- | youtube/playlist.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube/playlist.py b/youtube/playlist.py index a2ff80f..83d530c 100644 --- a/youtube/playlist.py +++ b/youtube/playlist.py @@ -28,7 +28,8 @@ def playlist_ctoken(playlist_id, offset, include_shorts=True): return base64.urlsafe_b64encode(pointless_nest).decode('ascii') -def playlist_first_page(playlist_id, report_text="Retrieved playlist", use_mobile=False): +def playlist_first_page(playlist_id, report_text="Retrieved playlist", + use_mobile=False): if use_mobile: url = 'https://m.youtube.com/playlist?list=' + playlist_id + '&pbj=1' content = util.fetch_url( @@ -47,7 +48,8 @@ def playlist_first_page(playlist_id, report_text="Retrieved playlist", use_mobil return content -def get_videos(playlist_id, page, include_shorts=True, use_mobile=False): +def get_videos(playlist_id, page, include_shorts=True, use_mobile=False, + report_text='Retrieved playlist'): # mobile requests return 20 videos per page if use_mobile: page_size = 20 @@ -62,7 +64,7 @@ def get_videos(playlist_id, page, include_shorts=True, use_mobile=False): include_shorts=include_shorts) url += "&pbj=1" content = util.fetch_url( - url, headers, report_text="Retrieved playlist", + url, headers, report_text=report_text, debug_name='playlist_videos' ) |