Made for kids and paid promotion filtering, shorts filtering update
This release introduces two new user parameters based on video types:
only_made_for_kids
: Defaults to False. If set to True, only videos that are considered appropriate for children by YouTube will be added to the playlist.allow_paid_promotions
: Defaults to True. If set to False, videos that contain paid promotions (if disclosed properly by the creator during the upload process) will not be added to the playlist.
The shorts filtering feature has also been updated and improved. Since YouTube still does not provide a straightforward way to differentiate Shorts from regular videos in their API, the filtering has to be done somewhat creatively:
Regular videos and livestreams redirect when accessed via the Shorts URL format (https://www.youtube.com/shorts/video_ID), while actual Shorts do not. The updated shorts filtering feature takes advantage of this by:
- Checking if a video ID redirects when accessed via the Shorts URL.
- If no redirection occurs and the video is shorter than 180 seconds, it is classified as a Short.
- Shorts are then filtered out or kept based on the
keep_shorts
parameter.
Full Changelog: v2.3.0...v2.4.0