Giter Club home page Giter Club logo

podlister's Introduction

Playlist2Podcast

CI Docker Pulls buymeacoffee donate link

A self-hosted application that lets you create podcast RSS feeds from YouTube playlists.

What Does This Do?

Takes a list of YouTube playlists and:

  • Downloads all the videos in audio only format (best quality)
  • Generates an RSS XML feed and writes it to a file so that the audio files can be used/read by podcast apps

The generated RSS XML file is located at podcasts_path/playlist_title/podcast.xml.

If the playlist title has special characters, p2p makes the name safe for filesystems, so will change and/or remove special characters from the directory name. To get the directory name, the easiest way is to either ls your podcast directory or look in the logs.

What Does This Not Do?

This does not actually host the downloaded/created files, you will need a static web server for that, I reccomend Caddy or nginx.

The directory you want to serve is the same one that you put as the podcasts_path config variable.

Once you have that setup you can simply put the URL to each generated podcast.xml into your chosen podcast app, for example https://podcasts.example.com/test/podcast.xml where test is the name of the directory that p2p saved a podcasts data to.

Running & Config

The requirements in requirements.txt need installing first, you can do this your own way or by doing pip install -r requirements.txt.

Run p2p with python main.py, or see below for Docker.

Once running p2p will check for playlist updates once every 24 hours.

p2p will look for a config.yaml file where it is run, if running in Docker you will want to mount it in /app, like so:

-v $(pwd)/config.yaml:/app/config.yaml:ro

Here's what the contents should look like:

# The URL that you are going to be hosting the podcast files at.
host_base_url: "https://podcasts.example.com/"

# The path (either on your system or inside the Docker container) that will contain the podcast data.
podcasts_path: "/podcasts"

# The date since to download videos. Will download only videos uploaded on or after this date. 
# The date can be "YYYYMMDD" or in the format "(now|today)[+-][0-9](day|week|month|year)(s)?" 
# (see "dateafter" on https://github.com/yt-dlp/yt-dlp#general-options for more info).
# Optional parameter: skip it or set empty to download all videos.
dateafter: "today-6months"

# The list of playlists to download and host. MUST be playlist URLs, NOT video URLs.
podcasts:
  - "https://www.youtube.com/playlist?list=PLTLwdZqDsAvtGmVvJqRS2czLq2YZ_ZHPJ"

Docker

Example run command:

docker run -d --name p2p --restart unless-stopped \
    -v $(pwd)/config.yaml:/app/config.yaml:ro \
    -v $(pwd)/podcasts:/podcasts \
    psidex/playlist2podcast

Don't forget if you're using the Docker build, podcast_path in config.yaml should reference the path inside the container, not outside it.

Credits

Uses yt-dlp to download the playlists and feedgen to create the RSS XML.

podlister's People

Contributors

mshcheglov avatar psidex avatar thunderwilson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.