nitter-rss-proxy

command module
v0.0.0-...-0bd5deb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

README

nitter-rss-proxy

Build Status

As of early February 2024, Nitter is sadly dead due to Twitter API changes. Some public instances are still working, but it's only a matter of time until their guest accounts expire and they go down, never to return.


Twitter stopped providing RSS feeds in 2011. Nitter, an alternate Twitter frontend, serves ATOM feeds, and there are various public Nitter instances. However, the public instances are constantly going up and down or getting rate-limited by Twitter, in my experience.

This repository provides a small Go HTTP server that accepts requests for RSS feeds and iterates through multiple Nitter instances until it finds one that's working. It also attempts to rewrite GUIDs and links within the feed to refer to https://twitter.com rather than the particular Nitter instance that generated the feed, so that feed readers won't show duplicate items from different instances.

Usage

Compile and install the server by running go install.

Usage of nitter-rss-proxy:
  -addr string
    	Network address to listen on (default "localhost:8080")
  -base string
    	Base URL for served feeds
  -cycle
    	Cycle through instances (default true)
  -debug-authors
    	Log per-author tweet counts (default true)
  -fastcgi
    	Use FastCGI instead of listening on -addr
  -format string
    	Feed format to write ("atom", "json", "rss") (default "atom")
  -instances string
    	Comma-separated list of URLs of Nitter instances to use (default "https://nitter.net")
  -rewrite
    	Rewrite tweet content to point at twitter.com (default true)
  -timeout int
    	HTTP timeout in seconds for fetching a feed from a Nitter instance (default 10)
  -user string
    	User to fetch to stdout (instead of starting a server)

The server passes GET request paths to the Nitter instance:

  • http://localhost:8080/USPS
  • http://localhost:8080/USPS,NWS
  • http://localhost:8080/USPS/media
  • http://localhost:8080/USPS/search
  • http://localhost:8080/USPS/with_replies

It also passes max_position=[ID] query parameters to Nitter and includes Min-Id headers in responses.

You can also pass the -user flag to fetch the supplied user's feed and write it to stdout.

Docker

Docker can be used to run nitter-rss-proxy in a container. The Dockerfile in this repository builds a container image that runs an instance of nitter-rss-proxy listening for HTTP GET requests on port 8080.

The image's default entrypoint is the nitter-rss-proxy command. At the very least, you'll probably want to pass the -instances flag and a comma-separated list of Nitter instances to cycle between.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL