{"id":37100418,"url":"https://github.com/derat/twittuh","last_synced_at":"2026-01-14T12:13:59.481Z","repository":{"id":61626821,"uuid":"278718432","full_name":"derat/twittuh","owner":"derat","description":"Make RSS, ATOM, or JSON feeds from Twitter timelines","archived":true,"fork":false,"pushed_at":"2022-09-12T19:40:10.000Z","size":595,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T19:22:07.711Z","etag":null,"topics":["atom","golang","rss","twitter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-10T19:36:48.000Z","updated_at":"2023-04-16T01:26:27.000Z","dependencies_parsed_at":"2022-10-19T19:15:21.773Z","dependency_job_id":null,"html_url":"https://github.com/derat/twittuh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/derat/twittuh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derat%2Ftwittuh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derat%2Ftwittuh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derat%2Ftwittuh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derat%2Ftwittuh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derat","download_url":"https://codeload.github.com/derat/twittuh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derat%2Ftwittuh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","golang","rss","twitter"],"created_at":"2026-01-14T12:13:58.949Z","updated_at":"2026-01-14T12:13:59.468Z","avatar_url":"https://github.com/derat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twittuh\n\n[![Build Status](https://storage.googleapis.com/derat-build-badges/fb01aa0f-16d4-4d9a-b229-c83a71082a32.svg)](https://storage.googleapis.com/derat-build-badges/fb01aa0f-16d4-4d9a-b229-c83a71082a32.html)\n\n`twittuh` is a Go program that loads a user's Twitter timeline using a [headless\nChrome] browser and generates an RSS feed containing their tweets.\n\n**2021-04-08: I'm unlikely to put more effort into this, as it's becoming\nexceedingly hard to make the headless-Chrome approach work reliably on low-spec\nVPSes. I recommend looking at [Nitter], which also provides RSS feeds of\ntimelines.**\n\nI don't have (or want) a Twitter account, and I found myself repeatedly clicking\non a dozen or so bookmarks to check for updates. It felt like I was in the\nyear 2000. Thanks to this program, I can use an RSS reader to monitor these\ntimelines, making me feel like I'm in the year 2005 instead.\n\nThis program originally scraped the plain-HTML \"Legacy Twitter\" pages that were\nserved to old browsers, but [Twitter shut down the interface] on 2020-12-16. Now\nthis program uses Chrome to construct the complete DOM (i.e. by executing\nJavaScript) and parses that instead.\n\n[headless Chrome]: https://developers.google.com/web/updates/2017/04/headless-chrome\n[Nitter]: https://github.com/zedeus/nitter\n[Twitter shut down the interface]: https://screenrant.com/twitter-legacy-nintendo-3ds-shut-down-date-december-2020/\n\n## Installation\n\nTo compile and install `twittuh`, run the following (after [installing Go] if\nyou don't have it already):\n\n```\n$ go install\n```\n\nThe `twittuh` executable will be installed to `$GOPATH/bin` (or `$GOBIN` if\nyou've set it directly).\n\nHeadless Chrome is controlled by the [chromedp package], but you must install\nChrome manually. I was able to do this on a Debian `buster` amd64 server by\nrunning the following as the `root` user:\n\n```\n# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\n# dpkg -i google-chrome-stable_current_amd64.deb\n# apt install -f\n```\n\n(The `dpkg` command will likely fail due to missing dependencies, which can be\ninstalled using the subsequent `apt` command.)\n\n[installing Go]: https://golang.org/doc/install\n[chromedp package]: https://github.com/chromedp/chromedp\n\n## Usage\n\n```\nUsage: twittuh [flag]... \u003cuser\u003e \u003cfile\u003e\nCreates an RSS feed from a Twitter user's timeline.\nPass '-' for \u003cfile\u003e to write feed to stdout.\nFlags:\n  -browser-size string\n        Browser viewport size (default \"1024x8192\")\n  -cache-dir string\n        Chrome cache directory\n  -debug-chrome\n        Log noisy Chrome debug messages\n  -debug-file string\n        HTML timeline file to parse for debugging\n  -dump-dom\n        Dump the timeline DOM to stdout for debugging\n  -fetch-retries int\n        Number of times to retry fetching\n  -fetch-timeout int\n        Fetch timeout in seconds\n  -force\n        Write feed even if there are no new tweets\n  -format string\n        Feed format to write (\"atom\", \"json\", \"rss\") (default \"atom\")\n  -page-settle-delay int\n        Seconds to wait for page render (default 2)\n  -proxy string\n        Optional proxy server (e.g. \"socks5://localhost:9050\")\n  -replies\n        Include the user's replies\n  -serve string\n        Listen for requests over HTTP (e.g. \"0.0.0.0:8080\")\n  -show-sensitive\n        Show sensitive content in tweets (default true)\n  -show-sensitive-delay int\n        Seconds to wait after showing sensitive content (default 2)\n  -simplify\n        Simplify HTML in feed (default true)\n  -skip-users string\n        Comma-separated users whose tweets should be skipped\n  -tor-control string\n        Interface for resetting Tor circuits after fetch fails (e.g. \"0.0.0.0:9051\")\n  -tweet-timeout int\n        Timeout for loading tweets in seconds\n  -verbose\n        Enable verbose logging\n```\n\n## Tips\n\n### Tor\n\nTwitter seems to haphazardly block unauthenticated timeline requests. When this\nhappens, the timeline page itself (e.g. `https://twitter.com/NWS`) loads but the\nXHR to load the actual tweets fails. The page shows a `Something went wrong.`\nmessage and a `Try again` button.\n\nI suspect that some cloud providers' networks are proactively blocked.\nFortunately, it's easy to route requests through [Tor].\n\nOn a Debian system, run the following as the `root` user to install Tor:\n\n```\n# apt install tor\n```\n\nYou can then pass `-proxy socks5://localhost:9050` to `twittuh` to tell it to\ninstruct Chrome to use the Tor proxy.\n\nSome Tor exit nodes also appear to be blocked. You can tell Tor to reset its\ncircuits (likely resulting in a new exit IP) by sending a `NEWNYM` command to\nits control socket (see `resetTorCircuits` in [main.go](./main.go)) or\n(allegedly) by sending a `HUP` signal to the `tor` process to tell it to reload\nits configuration.\n\n[Tor]: https://www.torproject.org/\n\n### Example script\n\nThe [scrape_twitter.py.example] file in this repository may be helpful if you\nwant to run `twittuh` periodically via cron to monitor multiple timelines. The\ntimeouts have been tweaked for a slow VPS that's using Tor. You'll want to edit\nthe variables near the top of the file for your system and rename it to\n`scrape_twitter.py`.\n\nPay particular attention to the `INTERVAL_SEC` variable, which specifies the\ntotal amount of time allocated to each invocation of the script. If you want to\ncheck each timeline once every four hours, change `INTERVAL_SEC` to `4 * 3600`\nand add a line like the following to your crontab:\n\n```cron\n30 */4 * * * /path/to/scrape_twitter.py\n```\n\n[scrape_twitter.py.example]: ./scrape_twitter.py.example\n\n### Docker\n\n[Docker] can be used to run `twittuh -serve` in a container. The\n[Dockerfile](./Dockerfile) in this repository builds a container image that runs\nan instance of `twittuh` listening for HTTP `GET` requests on port 8080. Tor is\nalso installed. The HTTP endpoint accepts `user`, `format`, and `skipUsers`\nquery parameters corresponding to the similarly-named flags. It returns a 401\nerror if the user has restricted their tweets to followers (i.e. \"These Tweets\nare protected\").\n\nWhen executed in this directory, the following command uses [Cloud Build] to\nbuild a container and submit it to the [Container Registry].\n\n```\n$ gcloud --project ${PROJECT_ID} builds submit \\\n    --tag gcr.io/${PROJECT_ID}/twittuh\n```\n\nAfter updating the container image, you can run a command like the following to\nmake a [Compute Engine] instance reload it:\n\n```\n$ gcloud --project ${PROJECT_ID} compute instances update-container \\\n    ${GCE_INSTANCE} --container-image gcr.io/${PROJECT_ID}/twittuh\n```\n\n[Docker]: https://www.docker.com/\n[Cloud Build]: https://cloud.google.com/build\n[Container Registry]: https://cloud.google.com/container-registry\n[Compute Engine]: https://cloud.google.com/compute\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderat%2Ftwittuh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderat%2Ftwittuh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderat%2Ftwittuh/lists"}