Nitter is not dead post

This commit is contained in:
Gabriel Simmer 2024-03-10 13:24:57 +00:00
parent f3e279dcd3
commit 7dc70aa950
Signed by: arch
SSH key fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ

View file

@ -0,0 +1,36 @@
#+title: Nitter is Not Dead
#+date: 2024-03-10
A quick one for you all today.
The maintainer of Nitter said, not long ago, that [[https://github.com/zedeus/nitter/issues/1155#issuecomment-1913361757]["Nitter is dead."]]. This isn't totally inaccurate, as Twitter/X has shut down huge swaths of their public API, especially ones Nitter relied on, making it very, very difficult to properly run a public instance. But private instances are still viable with a bit of tinkering.
The first step is cloning down the Nitter source code using Git. You'll then need to checkout the =guest_accounts= branch, and optionally build the Docker image for it. The important piece is ensuring you're running that branch's code wherever you're deploying.
Next, you'll need some tokens to feed into Nitter. Thankfully, someone has already written some Python to do this for us, which you can find [[https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663][here]]. Fill out the username and password, then run it. This will return a few JSON payloads, but the one you want is at the very end (you will also want to convert the single quotes to double quotes). Create a new file alongside your =nitter.conf= file named =guest_accounts.json= with the JSON in an array:
#+begin_src json
[
{
"user": {
"id": 123,
"id_str": "...",
"name": "...",
"screen_name": "..."
},
"next_link": {
"link_type": "subtask",
"link_id": "next_link",
"subtask_id": "SuccessExit"
},
"oauth_token": "...",
"oauth_token_secret": "...",
"known_device_token": "...",
"attribution_event": "login"
}
]
#+end_src
Finally, run Nitter! Make sure you have a Redis instance setup for it for caching, and you should be good to go. You can add as many accounts to the =guest_accounts.json= file as you need, which Nitter will cycle through as needed to spread out the requests and rate limiting. Using a proxy is probably also recommended, but it's likely Twitter/X is blocking many of those at this point.
I expect Twitter/X to eventually crack down further on this, but for the time being we can continue to enjoy the nicer and more privacy concious interface Nitter provides.