From ca4a7356924450f21228e823b4bcc1416aea05d3 Mon Sep 17 00:00:00 2001 From: Astound Date: Mon, 22 Jan 2024 05:55:59 +0800 Subject: Add settings for filtering out shorts in subscriptions and channels --- youtube/subscriptions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'youtube/subscriptions.py') diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index ea544a3..e37ac28 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -464,8 +464,12 @@ def _get_atoma_feed(channel_id): def _get_channel_videos_first_page(channel_id, channel_status_name): try: # First try the playlist method - pl_json = playlist.get_videos('UU' + channel_id[2:], 1, - include_shorts=False, report_text=None) + pl_json = playlist.get_videos( + 'UU' + channel_id[2:], + 1, + include_shorts=settings.include_shorts_in_subscriptions, + report_text=None + ) pl_info = yt_data_extract.extract_playlist_info(pl_json) if pl_info.get('items'): pl_info['items'] = pl_info['items'][0:30] -- cgit v1.2.3