Skip to content

Instantly share code, notes, and snippets.

@ChuckMac
ChuckMac / youtube_channel_watch.py
Created May 4, 2023 14:08
Watch and auto-download new episodes of a YouTube channel and rename to Plex friendly format
"""
This script can be used to attempt to download new videos from a
YouTube channel and rename them to a Plex friendly format.
ex: s01e01 - Video Title[ID].mp4
s01e01 - Video Title.json
s01e01 - Video Title.webp
It will skip any videos that are shorter than the specified
minimum length (in seconds) to avoid downloading shorts.
{
"ride": {
"free_for_limited_time": false,
"content_availability": "available",
"content_availability_level": "digital_and_above",
"is_limited_ride": false,
"availability": { "is_available": true, "reason": null },
"class_type_ids": ["c87e20095d80463db5ce04df7fe2b989"],
"content_provider": "peloton",
"content_format": "video",