youtube-posts-rss

YouTube Posts (From Community Tab) RSS Feeds

This project provides an automated solution to generate a single RSS feed for a specific YouTube channel’s community posts. It uses a Python script and a GitHub Actions workflow to periodically scrape community posts and publish them as a standard RSS file, which can be used with any RSS reader or automation tool.

The primary use case is to easily cross-post your YouTube community announcements to other platforms like Discord, Reddit, or Bluesky, which often support RSS feeds.

Features

How to Get Started

Step 1: Fork this Repository

Start by forking this repository to your own GitHub account. This will create a copy of the entire project under your user profile.

Step 2: Configure GitHub Secrets

The GitHub Actions workflow needs permission to commit the generated RSS file back to your repository. You must create a Personal Access Token and add it as a secret.

  1. Go to your GitHub Settings.
  2. Navigate to Developer settings > Personal access tokens > Tokens (classic).
  3. Click on Generate new token (classic).
  4. Give the token a descriptive name (e.g., YOUTUBE_RSS_BOT).
  5. Set an expiration date for security.
  6. Under Select scopes, check the box for repo (Full control of private repositories). This is the only permission needed.
  7. Click Generate token and copy the generated token immediately. You will not be able to see it again.
  8. Go to your forked repository’s Settings.
  9. Click on Secrets and variables > Actions.
  10. Click New repository secret.
  11. Set the name as GH_TOKEN and paste the token you copied into the “Secret” field.
  12. Click Add secret.

Step 3: Edit the Python Script

Since the script is now for a single channel, you need to edit the generate_rss.py file to include the CHANNEL_ID of the channel you want to monitor.

Open the generate_rss.py file and change the line: CHANNEL_ID = "UCO6axYvGFekWJjmSdbHo-8Q" to your channel ID. If you want to use a filename other than feed.xml, you can also edit the corresponding line.

Step 4: Run the Workflow

The workflow (.github/workflows/rss.yml) is already configured to run the script and commit the generated feed.xml file. For the first run, you need to run the workflow manually:

  1. Go to the Actions tab of your repository.

  2. Click on the Generate Single RSS Feed workflow in the left sidebar.
  3. Click the Run workflow dropdown button.
  4. Click the green Run workflow button to start the process.

The workflow will run and commit the new feed.xml file. It will continue to run hourly to keep the feed updated.

Step 5: Enable GitHub Pages

For the RSS feed to be public, you must enable GitHub Pages.

  1. Go to your repository’s Settings.
  2. Click on Pages in the left sidebar.
  3. Under Build and deployment, set the Source to Deploy from a branch.
  4. Select main as the branch and / (root) as the folder.
  5. Click Save.

After the first run of the workflow, you can find your feed at a URL like: https://[seu-usuario].github.io/[seu-repositorio]/feed.xml