7f4b9e4c65d3c22d6465d61651efc8201a944fb5
Facebook to RSS Scraper
This tool scrapes public posts from a Facebook page and converts them into an RSS feed (.xml). It can be run locally or automated using GitHub Actions.
Prerequisites
- Python 3.9+
- pip (Python package installer)
Local Installation & Usage
-
Clone the repository:
git clone <repository-url> cd fb-rss-bridge -
Install dependencies: It is recommended to use a virtual environment.
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Run the scraper:
python3 main.py <page_name>Replace
<page_name>with the Facebook page ID or username.Options:
--output: Specify output file name (default:feed.xml)--pages: Number of pages to scrape (default: 1)
Example:
python3 main.py GitHub --pages 2 --output github_feed.xml
GitHub/Gitea Actions Automated Feed (Free Cloud Solution)
This repository is configured to run automatically on GitHub's free tier for public repositories.
-
How it works:
- The
.gitea/workflows/update_feed.ymlfile defines a "cron job" that runs every 6 hours. - It spins up a temporary server (runner), installs Python, runs the script, and saves the
feed.xmlback to your code. - This entire process is free for public repositories on GitHub.
- The
-
Configuration: The workflow is scheduled to run every 6 hours. You can customize the target Facebook page in
.gitea/workflows/update_feed.yml:env: FB_PAGE: "GitHub" # Change this to the desired page ID/username
Languages
Python
100%