rss bridge

2025-12-10 0 943

RSS-Bridge

RSS-Bridge

RSS-Bridge is a PHP web application.

It generates web feeds for websites that don\’t have one.

Officially hosted instance: https://rss-**bridge*.org/bridge01/

IRC channel #rssbridge at https://libe*r*a.ch*at/

Full documentation

Alternatively find another
public instance.

Requires minimum PHP 7.4.

Screenshot #1 Screenshot #2
Screenshot #3 Screenshot #4
Screenshot #5 Screenshot #6

A subset of bridges (15/447)

  • CssSelectorBridge: Scrape out a feed using CSS selectors
  • FeedMergeBridge: Combine multiple feeds into one
  • FeedReducerBridge: Reduce a noisy feed by some percentage
  • FilterBridge: Filter a feed by excluding/including items by keyword
  • GettrBridge: Fetches the latest posts from a GETTR user
  • MastodonBridge: Fetches statuses from a Mastodon (ActivityPub) instance
  • RedditBridge: Fetches posts from a user/subredit (with filtering options)
  • RumbleBridge: Fetches channel/user videos
  • SoundcloudBridge: Fetches music by username
  • TelegramBridge: Fetches posts from a public channel
  • ThePirateBayBridge: Fetches torrents by search/user/category
  • TikTokBridge: Fetches posts by username
  • TwitchBridge: Fetches videos from channel
  • XPathBridge: Scrape out a feed using XPath expressions
  • YoutubeBridge: Fetches videos by username/channel/playlist/search
  • YouTubeCommunityTabBridge: Fetches posts from a channel\’s community tab

Tutorial

How to install on traditional shared web hosting

RSS-Bridge can basically be unzipped into a web folder. Should be working instantly.

Latest zip:
https://gi*thu*b*.com/RSS-Bridge/rss-bridge/archive/refs/heads/master.zip (2MB)

How to install on Debian 12 (nginx + php-fpm)

These instructions have been tested on a fresh Debian 12 VM from Digital Ocean (1vcpu-512mb-10gb, 5 USD/month).

timedatectl set-timezone Europe/Oslo

apt install git nginx php8.2-fpm php-mbstring php-simplexml php-curl php-intl

# Create a user account
useradd --shell /bin/bash --create-home rss-bridge

cd /var/www

# Create folder and change its ownership to rss-bridge
mkdir rss-bridge && chown rss-bridge:rss-bridge rss-bridge/

# Become rss-bridge
su rss-bridge

# Clone master branch into existing folder
git clone https://gi**thub.*com/RSS-Bridge/rss-bridge.git rss-bridge/
cd rss-bridge

# Copy over the default config (OPTIONAL)
cp -v config.default.ini.php config.ini.php

# Recursively give full permissions to user/owner
chmod 700 --recursive ./

# Give read and execute to others on folder ./static
chmod o+rx ./ ./static

# Recursively give give read to others on folder ./static
chmod o+r --recursive ./static

Nginx config:

# /etc/nginx/sites-enabled/rss-bridge.conf

server {
    listen 80;

    # TODO: change to your own server name
    server_name example.com;

    access_log /var/log/nginx/rss-bridge.access.log;
    error_log /var/log/nginx/rss-bridge.error.log;
    log_not_found off;

    # Intentionally not setting a root folder

    # Static content only served here
    location /static/ {
        alias /var/www/rss-bridge/static/;
    }

    # Pass off to php-fpm only when location is EXACTLY == /
    location = / {
        root /var/www/rss-bridge/;
        include snippets/fastcgi-php.conf;
        fastcgi_read_timeout 45s;
        fastcgi_pass unix:/run/php/rss-bridge.sock;
    }

    # Reduce log noise
    location = /favicon.ico {
        access_log off;
    }

    # Reduce log noise
    location = /robots.txt {
        access_log off;
    }
}

PHP FPM pool config:

; /etc/php/8.2/fpm/pool.d/rss-bridge.conf

[rss-bridge]

user = rss-bridge
group = rss-bridge

listen = /run/php/rss-bridge.sock

listen.owner = www-data
listen.group = www-data

; Create 10 workers standing by to serve requests
pm = static
pm.max_children = 10

; Respawn worker after 500 requests (workaround for memory leaks etc.)
pm.max_requests = 500

PHP ini config:

; /etc/php/8.2/fpm/conf.d/30-rss-bridge.ini

max_execution_time = 15
memory_limit = 64M

Restart fpm and nginx:

# Lint and restart php-fpm
php-fpm8.2 -t && systemctl restart php8.2-fpm

# Lint and restart nginx
nginx -t && systemctl restart nginx

How to install from Composer

Install the latest release.

cd /var/www
composer create-project -v --no-dev --no-scripts rss-bridge/rss-bridge

How to install with Caddy

TODO. See #3785

Install from Docker Hub:

Install by downloading the docker image from Docker Hub:

# Create container
docker create --name=rss-bridge --publish 3000:80 --volume $(pwd)/config:/config rssbridge/rss-bridge

You can put custom config.ini.php and bridges into ./config.

You must restart container for custom changes to take effect.

See docker-entrypoint.sh for details.

# Start container
docker start rss-bridge

Browse http://lo**calh*ost:3000/

Install by locally building from Dockerfile

# Build image from Dockerfile
docker build -t rss-bridge .

# Create container
docker create --name rss-bridge --publish 3000:80 --volume $(pwd)/config:/config rss-bridge

You can put custom config.ini.php and bridges into ./config.

You must restart container for custom changes to take effect.

See docker-entrypoint.sh for details.

# Start container
docker start rss-bridge

Browse http://lo**calh*ost:3000/

Install with docker-compose (using Docker Hub)

You can put custom config.ini.php and bridges into ./config.

You must restart container for custom changes to take effect.

See docker-entrypoint.sh for details.

docker-compose up

Browse http://lo**calh*ost:3000/

Other installation methods

The Heroku quick deploy currently does not work. It might work if you fork this repo and
modify the repository in scalingo.json. See #2688

Learn more in
Installation.

How-to

How to fix \”Access denied.\”

Output is from php-fpm. It is unable to read index.php.

chown rss-bridge:rss-bridge /var/www/rss-bridge/index.php

How to password-protect the instance (token)

Modify config.ini.php:

[authentication]

token = \"hunter2\"

How to remove all cache items

As current user:

bin/cache-clear

As user rss-bridge:

sudo -u rss-bridge bin/cache-clear

As root:

sudo bin/cache-clear

How to remove all expired cache items

bin/cache-prune

How to fix \”PHP Fatal error: Uncaught Exception: The FileCache path is not writable\”

# Give rss-bridge ownership
chown rss-bridge:rss-bridge -R /var/www/rss-bridge/cache

# Or, give www-data ownership
chown www-data:www-data -R /var/www/rss-bridge/cache

# Or, give everyone write permission
chmod 777 -R /var/www/rss-bridge/cache

# Or last ditch effort (CAREFUL)
rm -rf /var/www/rss-bridge/cache/ && mkdir /var/www/rss-bridge/cache/

How to fix \”attempt to write a readonly database\”

The sqlite files (db, wal and shm) are not writeable.

chown -v rss-bridge:rss-bridge cache/*

How to fix \”Unable to prepare statement: 1, no such table: storage\”

rm cache/*

How to create a new bridge from scratch

Create the new bridge in e.g. bridges/BearBlogBridge.php:

<?php

class BearBlogBridge extends BridgeAbstract
{
    const NAME = \'BearBlog (bearblog.dev)\';

    public function collectData()
    {
        $dom = getSimpleHTMLDOM(\'https://herman.be*arb*l*og.dev/blog/\');
        foreach ($dom->find(\'.blog-posts li\') as $li) {
            $a = $li->find(\'a\', 0);
            $this->items[] = [
                \'title\' => $a->plaintext,
                \'uri\' => \'https://herman.b*ea*r*blog.dev\' . $a->href,
            ];
        }
    }
}

Learn more in bridge api.

How to enable all bridges

enabled_bridges[] = *

How to enable some bridges

enabled_bridges[] = TwitchBridge
enabled_bridges[] = GettrBridge

How to enable debug mode

The
debug mode
disables the majority of caching operations.

enable_debug_mode = true

How to switch to memcached as cache backend

[cache]

; Cache backend: file (default), sqlite, memcached, null
type = \"memcached\"

How to switch to sqlite3 as cache backend

type = \"sqlite\"

How to disable bridge errors (as feed items)

When a bridge fails, RSS-Bridge will produce a feed with a single item describing the error.

This way, feed readers pick it up and you are notified.

If you don\’t want this behaviour, switch the error output to http:

[error]

; Defines how error messages are returned by RSS-Bridge
;
; \"feed\" = As part of the feed (default)
; \"http\" = As HTTP error message
; \"none\" = No errors are reported
output = \"http\"

How to accumulate errors before finally reporting it

Modify report_limit so that an error must occur 3 times before it is reported.

; Defines how often an error must occur before it is reported to the user
report_limit = 3

The report count is reset to 0 each day.

How to password-protect the instance (HTTP Basic Auth)

[authentication]

enable = true
username = \"alice\"
password = \"cat\"

Will typically require feed readers to be configured with the credentials.

It may also be possible to manually include the credentials in the URL:

https://a*lice*:ca*t@rss-bridge.org/bridge01/?action=display&bridge=FabriceBellardBridge&format=Html

How to create a new output format

See formats/PlaintextFormat.php for an example.

How to run unit tests and linter

These commands require that you have installed the dev dependencies in composer.json.

Run all tests:

./vendor/bin/phpunit

Run a single test class:

./vendor/bin/phpunit --filter UrlTest

Run linter:

./vendor/bin/phpcs --standard=phpcs.xml --warning-severity=0 --extensions=php -p ./

https://gi*thub.co*m*/squizlabs/PHP_CodeSniffer/wiki

How to spawn a minimal development environment

php -S 127.0.0.1:9001

http://127.**0*.0.1:9001/

Explanation

We are RSS-Bridge community, a group of developers continuing the project initiated by sebsauvage,
webmaster of
sebsauvage.net, author of
Shaarli and
ZeroBin.

See CONTRIBUTORS.md

RSS-Bridge uses caching to prevent services from banning your server for repeatedly updating feeds.
The specific cache duration can be different between bridges.

RSS-Bridge allows you to take full control over which bridges are displayed to the user.
That way you can host your own RSS-Bridge service with your favorite collection of bridges!

Current maintainers (as of 2024): @dvikan and @Mynacol #2519

Reference

Feed item structure

This is the feed item structure that bridges are expected to produce.

    $item = [
        \'uri\' => \'https://exa**mple*.com/blog/hello\',
        \'title\' => \'Hello world\',
        // Publication date in unix timestamp
        \'timestamp\' => 1668706254,
        \'author\' => \'Alice\',
        \'content\' => \'Here be item content\',
        \'enclosures\' => [
            \'https://ex*amp*l*e.com/foo.png\',
            \'https://e*x**ample.com/bar.png\'
        ],
        \'categories\' => [
            \'news\',
            \'tech\',
        ],
        // Globally unique id
        \'uid\' => \'e7147580c8747aad\',
    ]

Output formats

  • Atom: Atom feed, for use in feed readers
  • Html: Simple HTML page
  • Json: JSON, for consumption by other applications
  • Mrss: MRSS feed, for use in feed readers
  • Plaintext: Raw text, for consumption by other applications
  • Sfeed: Text, TAB separated

Cache backends

  • File
  • SQLite
  • Memcached
  • Array
  • Null

Licenses

The source code for RSS-Bridge is Public Domain.

RSS-Bridge uses third party libraries with their own license:

  • Parsedown licensed under the MIT License
  • PHP Simple HTML DOM Parser licensed under the MIT License
  • php-urljoin licensed under the MIT License
  • Laravel framework licensed under the MIT License

Rant

Dear so-called \”social\” websites.

Your catchword is \”share\”, but you don\’t want us to share. You want to keep us within your walled gardens. That\’s why you\’ve been removing RSS links from webpages, hiding them deep on your website, or removed feeds entirely, replacing it with crippled or demented proprietary API. FUCK YOU.

You\’re not social when you hamper sharing by removing feeds. You\’re happy to have customers creating content for your ecosystem, but you don\’t want this content out – a content you do not even own. Google Takeout is just a gimmick. We want our data to flow, we want RSS or Atom feeds.

We want to share with friends, using open protocols: RSS, Atom, XMPP, whatever. Because no one wants to have your service with your applications using your API force-feeding them. Friends must be free to choose whatever software and service they want.

We are rebuilding bridges you have willfully destroyed.

Get your shit together: Put RSS/Atom back in.

下载源码

通过命令行克隆项目:

git clone https://github.com/RSS-Bridge/rss-bridge.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 编程相关 rss bridge https://www.zuozi.net/32981.html

simple cache
上一篇: simple cache
crater
下一篇: crater
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务