This commit is contained in:
2026-07-20 11:37:24 +02:00
parent 516e503f9c
commit 7f4b9e4c65
4 changed files with 178 additions and 2 deletions
+55 -2
View File
@@ -1,3 +1,56 @@
# fb-rss-bridge
# Facebook to RSS Scraper
https://github.com/ManthsCode/fb-rss-bridge
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
1. **Clone the repository:**
```bash
git clone <repository-url>
cd fb-rss-bridge
```
2. **Install dependencies:**
It is recommended to use a virtual environment.
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
3. **Run the scraper:**
```bash
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:**
```bash
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.
1. **How it works:**
- The `.gitea/workflows/update_feed.yml` file 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.xml` back to your code.
- This entire process is free for public repositories on GitHub.
2. **Configuration:**
The workflow is scheduled to run every 6 hours. You can customize the target Facebook page in `.gitea/workflows/update_feed.yml`:
```yaml
env:
FB_PAGE: "GitHub" # Change this to the desired page ID/username
```