nitter.net certificate expired on 15:08:30 GMT #1155

Closed
opened 2024-01-27 10:22:30 -05:00 by IdfbAn · 94 comments
IdfbAn commented 2024-01-27 10:22:30 -05:00 (Migrated from github.com)
No description provided.
ghost commented 2024-01-27 14:56:20 -05:00 (Migrated from github.com)

Luckily, this doesn't impact usability due to the removal of guest accounts #1154

Luckily, this doesn't impact usability due to the removal of guest accounts #1154
serhiisp commented 2024-01-27 15:12:18 -05:00 (Migrated from github.com)

Luckily, this doesn't impact usability due to the removal of guest accounts #1154

"You cannot visit nitter.net right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later."

> Luckily, this doesn't impact usability due to the removal of guest accounts #1154 "You cannot visit nitter.net right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later."
ghost commented 2024-01-27 15:17:08 -05:00 (Migrated from github.com)

Luckily, this doesn't impact usability due to the removal of guest accounts #1154

"You cannot visit nitter.net right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later."

I mean't that the website doesn't even work 😅

> > Luckily, this doesn't impact usability due to the removal of guest accounts #1154 > > "You cannot visit nitter.net right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later." I mean't that the website doesn't even work 😅
zautumnz commented 2024-01-27 17:25:02 -05:00 (Migrated from github.com)

Not the first time: https://github.com/zedeus/nitter/issues/714#issuecomment-1297392803 is there any reason not not have certbot renew in crontab on the reference instance?

~~Not the first time: https://github.com/zedeus/nitter/issues/714#issuecomment-1297392803 is there any reason not not have `certbot renew` in crontab on the reference instance?~~
zedeus commented 2024-01-27 18:06:48 -05:00 (Migrated from github.com)

Nitter is dead.

Nitter is dead.
cmj commented 2024-01-27 18:09:08 -05:00 (Migrated from github.com)

yes. thank you for all your work.

yes. thank you for all your work.
zautumnz commented 2024-01-27 20:02:55 -05:00 (Migrated from github.com)

Nitter is dead.

Just skimmed the other issues. This sucks, but wasn't really unexpected given the way X has been going. Thanks for all your work over the last 5 years.

> Nitter is dead. Just skimmed the other issues. This sucks, but wasn't really unexpected given the way X has been going. Thanks for all your work over the last 5 years.
BarbzYHOOL commented 2024-01-27 22:06:28 -05:00 (Migrated from github.com)

Nitter is dead.

noooooooooooooooooooooooooooooooooooooooooooo

> Nitter is dead. noooooooooooooooooooooooooooooooooooooooooooo
kurisufriend commented 2024-01-27 22:25:38 -05:00 (Migrated from github.com)

there goes all my interaction with twitter as a website :D

there goes all my interaction with twitter as a website :D
Sqaaakoi commented 2024-01-27 22:29:08 -05:00 (Migrated from github.com)

Nitter is dead.

Thank you for your service. I like opening everything sent to me in incognito/private mode, and Nitter made the modern "Twitter" work for me properly. It had to happen eventually, and I'm sad it has, but forgetting about Twitter entirely is probably the best thing to do. I understand not wanting to fight against a lost cause of a website. Again, thank you.

> Nitter is dead. Thank you for your service. I like opening everything sent to me in incognito/private mode, and Nitter made the modern "Twitter" work for me properly. It had to happen eventually, and I'm sad it has, but forgetting about Twitter entirely is probably the best thing to do. I understand not wanting to fight against a lost cause of a website. Again, thank you.
Mr-Andersen commented 2024-01-28 02:25:08 -05:00 (Migrated from github.com)

Thank you for making twitter bearable. Nitter will be missed

Thank you for making twitter bearable. Nitter will be missed
IdfbAn commented 2024-01-28 03:29:43 -05:00 (Migrated from github.com)

Nitter is dead.

Other instances (at least https://nitter.unixfox.eu) seem to still work, at least for me, so I don't think it's time to declare Nitter dead just yet.

> Nitter is dead. Other instances (at least https://nitter.unixfox.eu) seem to still work, at least for me, so I don't think it's time to declare Nitter dead just yet.
ghost commented 2024-01-28 04:13:40 -05:00 (Migrated from github.com)

Thank you for everything ❤️

Thank you for everything ❤️
SnowzNZ commented 2024-01-28 05:45:52 -05:00 (Migrated from github.com)

apolgy for bad english it is my first languagen’t

where were you when nitter die

i was at house eating dorito when phone ring

“nitter is kil”

“no”

apolgy for bad english it is my first languagen’t where were you when nitter die i was at house eating dorito when phone ring “nitter is kil” “no”
leafstrat commented 2024-01-28 07:22:34 -05:00 (Migrated from github.com)

The project can always transition into being a faster front-end utilizing user-credentials which would be easier to maintain compared to always trying these guest token gimmicks and utilizing "secret tokens" from old embedded systems and what not.

The main appeal for me was how speedy it was, rather than it allowing anonymous twitter usage.
I think this is a more productive way to go anyway, requiring user authentication, otherwise you have all sorts of people using these generously hosted projects to lazily scrape.

The project can always transition into being a faster front-end utilizing user-credentials which would be easier to maintain compared to always trying these guest token gimmicks and utilizing "secret tokens" from old embedded systems and what not. The main appeal for me was how speedy it was, rather than it allowing anonymous twitter usage. I think this is a more productive way to go anyway, requiring user authentication, otherwise you have all sorts of people using these generously hosted projects to lazily scrape.
lnoss commented 2024-01-28 07:45:26 -05:00 (Migrated from github.com)

The main appeal for me was how speedy it was, rather than it allowing anonymous twitter usage.

Meanwhile, the README:

A free and open source alternative Twitter front-end focused on privacy and performance.

> The main appeal for me was how speedy it was, rather than it allowing anonymous twitter usage. Meanwhile, the README: > A free and open source alternative Twitter front-end focused on **privacy** and performance.
leafstrat commented 2024-01-28 07:49:10 -05:00 (Migrated from github.com)

@lnoss I understand. 👍🏻

But personally I'd rather the project continues in a vein that's actually realistic for the circumstances, rather than discontinuing altogether or requiring all these cat and mouse games for zedeus and co trying to fight Twitter.

@lnoss I understand. 👍🏻 But personally I'd rather the project continues in a vein that's actually realistic for the circumstances, rather than discontinuing altogether or requiring all these cat and mouse games for `zedeus` and co trying to fight Twitter.
9Morello commented 2024-01-28 07:55:06 -05:00 (Migrated from github.com)

Thanks for supporting it for this long. Nitter was a fantastic piece of software that allowed me to see links from Twitter other people sent me, without loading their terrible web app.

I agree with @lolcatw , there's no point in playing this cat and mouse game with Twitter. The winning move is to not play it at all. If you want a vaguely similar experience, use distributed services that don't fight against their own users.

Thanks for supporting it for this long. Nitter was a fantastic piece of software that allowed me to see links from Twitter other people sent me, without loading their terrible web app. I agree with @lolcatw , there's no point in playing this cat and mouse game with Twitter. The winning move is to not play it at all. If you want a vaguely similar experience, use distributed services that don't fight against their own users.
Chiroyce1 commented 2024-01-28 08:01:26 -05:00 (Migrated from github.com)

Is it not viable at all to keep a public instance? I might use nitter once or twice a week, but I guess with several thousand users that does add up in requests.

Is it not viable at all to keep a public instance? I might use nitter once or twice a week, but I guess with several thousand users that does add up in requests.
cristeigabriela commented 2024-01-28 11:05:23 -05:00 (Migrated from github.com)

But personally I'd rather the project continues in a vein that's actually realistic for the circumstances, rather than discontinuing altogether or requiring all these cat and mouse games for zedeus and co trying to fight Twitter.

It seems like you want something very different then, so why don't you do it?

you have all sorts of people using these generously hosted projects to lazily scrape

Excuse me for seeing some irony with the aforementioned in mind.

> But personally I'd rather the project continues in a vein that's actually realistic for the circumstances, rather than discontinuing altogether or requiring all these cat and mouse games for `zedeus` and co trying to fight Twitter. It seems like *you* want something very different then, so why don't *you* do it? > you have all sorts of people using these generously hosted projects to lazily scrape Excuse me for seeing some irony with the aforementioned in mind.
Pawlicker commented 2024-01-28 11:18:44 -05:00 (Migrated from github.com)

Thanks for supporting it for this long. Nitter was a fantastic piece of software that allowed me to see links from Twitter other people sent me, without loading their terrible web app.

I agree with @lolcatw , there's no point in playing this cat and mouse game with Twitter. The winning move is to not play it at all. If you want a vaguely similar experience, use distributed services that don't fight against their own users.

"that don't fight against their own users" is the funniest thing given that invite-only Bluesky is basically very much centralized and Mastodon instances can feel like they're run by forum moderators. Or to quote one internet artist, "why should I use Bluesky if I'll get 2 retweets while on Twitter I'll get 100"?

The reason Nitter was used so much has to do with the fact that Twitter is still the center of cultural discussions online, at least in the mainstream sense. Elon Musk knows this, which is why he can get away with forcing logins, just like how there are stories of people turning off the adblockers because of the YouTube nag screens. The only people who end up using fedi religiously are banned from Twitter or are too abrasive for it, and this is the inconvenient truth (look how many Mastodon users have inactive accounts, you'll be surprised).

There needs to be a culture shift somehow to move the zeitgeist away from Twitter, but as of now it's going to stay there.

> Thanks for supporting it for this long. Nitter was a fantastic piece of software that allowed me to see links from Twitter other people sent me, without loading their terrible web app. > > I agree with @lolcatw , there's no point in playing this cat and mouse game with Twitter. The winning move is to not play it at all. If you want a vaguely similar experience, use distributed services that don't fight against their own users. "that don't fight against their own users" is the funniest thing given that invite-only Bluesky is [basically very much centralized](https://techcrunch.com/2024/01/24/bluesky-ceo-confronts-content-moderation-in-the-fediverse/) and Mastodon instances can feel [like they're run by forum moderators](https://fba.ryona.agency/?reverse=mastodon.art). Or to quote one internet artist, "why should I use Bluesky if I'll get 2 retweets while on Twitter I'll get 100"? The reason Nitter was used so much has to do with the fact that Twitter is still the center of cultural discussions online, at least in the mainstream sense. Elon Musk knows this, which is why he can get away with forcing logins, just like how there are stories of people turning off the adblockers because of the YouTube nag screens. The only people who end up using fedi religiously [are banned from Twitter](https://ethanzuckerman.com/2017/08/18/mastodon-is-big-in-japan-the-reason-why-is-uncomfortable/) or are too abrasive for it, and this is the inconvenient truth (look how many Mastodon users have inactive accounts, you'll be surprised). There needs to be a culture shift somehow to move the zeitgeist away from Twitter, but as of now it's going to stay there.
amogusussy commented 2024-01-28 11:29:35 -05:00 (Migrated from github.com)

Nitter is dead.

Long live nitter.

> Nitter is dead. Long live nitter.
TheBSODAndWSODFan commented 2024-01-28 11:31:09 -05:00 (Migrated from github.com)

btw, if you type thisisunsafe in "your connection is not private", it will bypass the hsts or certificate error. so, nitter still works in my side

btw, if you type thisisunsafe in "your connection is not private", it will bypass the hsts or certificate error. so, nitter still works in my side
TheBSODAndWSODFan commented 2024-01-28 11:36:01 -05:00 (Migrated from github.com)

if you using a phone to access nitter, try using otg keyboard, and type thisisunsafe

https://github.com/zedeus/nitter/assets/78845241/4e945588-1187-4b12-a845-41c6646d1768

if you using a phone to access nitter, try using otg keyboard, and type thisisunsafe https://github.com/zedeus/nitter/assets/78845241/4e945588-1187-4b12-a845-41c6646d1768
Chiroyce1 commented 2024-01-28 11:36:09 -05:00 (Migrated from github.com)

btw, if you type thisisunsafe in "your connection is not private", it will bypass the hsts or certificate error. so, nitter still works in my side

Sure it works but I don't think its a great idea to use it over http

> btw, if you type thisisunsafe in "your connection is not private", it will bypass the hsts or certificate error. so, nitter still works in my side Sure it works but I don't think its a great idea to use it over http
Silur commented 2024-01-28 11:41:28 -05:00 (Migrated from github.com)

We need more heroes like you, thanks for the years of selfless effort to save the internet

We need more heroes like you, thanks for the years of selfless effort to save the internet
cassepipe commented 2024-01-28 12:28:01 -05:00 (Migrated from github.com)

You'll be missed

You'll be missed
Tourfaint commented 2024-01-28 13:28:51 -05:00 (Migrated from github.com)

Welp, been using this after i randomly got banned for "manipulation and spam" (i never posted anything btw, only followed). Seems like unless i get a new phone number and start ban evading i have no other way to follow the artists that refuse to use other platforms, am i right?

Welp, been using this after i randomly got banned for "manipulation and spam" (i never posted anything btw, only followed). Seems like unless i get a new phone number and start ban evading i have no other way to follow the artists that refuse to use other platforms, am i right?
9Morello commented 2024-01-28 15:32:52 -05:00 (Migrated from github.com)

"that don't fight against their own users" is the funniest thing given that invite-only Bluesky is basically very much centralized and Mastodon instances can feel like they're run by forum moderators. Or to quote one internet artist, "why should I use Bluesky if I'll get 2 retweets while on Twitter I'll get 100"?

If you think Twitter as it is is a better fit for your use case than a Mastodon instance, by all means use what works best for you.

The only people who end up using fedi religiously are banned from Twitter or are too abrasive for it

That really is a pointless and baseless insult. The Asahi Linux project has a Mastodon account where they answer questions from users. They are not banned from Twitter or abrasive at all. Please do not insult random users like that.

> "that don't fight against their own users" is the funniest thing given that invite-only Bluesky is [basically very much centralized](https://techcrunch.com/2024/01/24/bluesky-ceo-confronts-content-moderation-in-the-fediverse/) and Mastodon instances can feel [like they're run by forum moderators](https://fba.ryona.agency/?reverse=mastodon.art). Or to quote one internet artist, "why should I use Bluesky if I'll get 2 retweets while on Twitter I'll get 100"? If you think Twitter as it is is a better fit for your use case than a Mastodon instance, by all means use what works best for you. > The only people who end up using fedi religiously are banned from Twitter or are too abrasive for it That really is a pointless and baseless insult. The Asahi Linux project has a Mastodon account where they answer questions from users. They are not banned from Twitter or abrasive at all. Please do not insult random users like that.
Pawlicker commented 2024-01-28 17:36:24 -05:00 (Migrated from github.com)

"that don't fight against their own users" is the funniest thing given that invite-only Bluesky is basically very much centralized and Mastodon instances can feel like they're run by forum moderators. Or to quote one internet artist, "why should I use Bluesky if I'll get 2 retweets while on Twitter I'll get 100"?

If you think Twitter as it is is a better fit for your use case than a Mastodon instance, by all means use what works best for you.

The only people who end up using fedi religiously are banned from Twitter or are too abrasive for it

That really is a pointless and baseless insult. The Asahi Linux project has a Mastodon account where they answer questions from users. They are not banned from Twitter or abrasive at all. Please do not insult random users like that.

The instance that account is on also uses authorized fetch, and hides their blocklist. That's how I know if I'm blocked from it because they don't let you see their list:
image

> > "that don't fight against their own users" is the funniest thing given that invite-only Bluesky is [basically very much centralized](https://techcrunch.com/2024/01/24/bluesky-ceo-confronts-content-moderation-in-the-fediverse/) and Mastodon instances can feel [like they're run by forum moderators](https://fba.ryona.agency/?reverse=mastodon.art). Or to quote one internet artist, "why should I use Bluesky if I'll get 2 retweets while on Twitter I'll get 100"? > > If you think Twitter as it is is a better fit for your use case than a Mastodon instance, by all means use what works best for you. > > > The only people who end up using fedi religiously are banned from Twitter or are too abrasive for it > > That really is a pointless and baseless insult. The Asahi Linux project has a Mastodon account where they answer questions from users. They are not banned from Twitter or abrasive at all. Please do not insult random users like that. The instance that account is on also uses authorized fetch, and hides their blocklist. That's how I know if I'm blocked from it because they don't let you see their list: ![image](https://github.com/zedeus/nitter/assets/92184373/b6b6f1af-1050-4c32-a07d-c4e789bcfa77)
ProGamerGov commented 2024-01-28 19:03:39 -05:00 (Migrated from github.com)

Nitter is dead.

@zedeus Are you ceasing development on it? Or are all the nitter instances going to go down?

> Nitter is dead. @zedeus Are you ceasing development on it? Or are all the nitter instances going to go down?
zedeus commented 2024-01-28 22:02:54 -05:00 (Migrated from github.com)

@ProGamerGov Both.

@ProGamerGov Both.
iiTzRichie commented 2024-01-29 00:19:19 -05:00 (Migrated from github.com)

Nitter is dead.

@zedeus Forgive me, but why is Nitter dead? Also, I'm still able to use various instances (including ones with a guest account) just fine, so I'm a bit confused rn. If we're talking about Nitter.net exclusively, that has never worked for me and I was never able to establish a connection to it, but other instances work fine.

> Nitter is dead. @zedeus Forgive me, but why is Nitter dead? Also, I'm still able to use various instances (including ones with a guest account) just fine, so I'm a bit confused rn. If we're talking about Nitter.net exclusively, that has never worked for me and I was never able to establish a connection to it, but other instances work fine.
cooljeanius commented 2024-01-29 00:42:33 -05:00 (Migrated from github.com)

Nitter is dead.

So, if that's the case, at what point will it be time to archive this repository?

> Nitter is dead. So, if that's the case, at what point will it be time to archive this repository?
the-blank-x commented 2024-01-29 00:46:48 -05:00 (Migrated from github.com)

Forgive me, but why is Nitter dead? Also, I'm still able to use various instances (including ones with a guest account) just fine, so I'm a bit confused rn. If we're talking about Nitter.net exclusively, that has never worked for me and I was never able to establish a connection to it, but other instances work fine.

Currently, Nitter uses guest accounts to access content on Twitter. Guest accounts expire after 30 days (IIRC) of them being created. Guest account creation has been shut off, so all existing guest accounts will be dead after 30 days max. Nitter instances with working guest accounts are not dead yet, but they will be.

> Forgive me, but why is Nitter dead? Also, I'm still able to use various instances (including ones with a guest account) just fine, so I'm a bit confused rn. If we're talking about Nitter.net exclusively, that has never worked for me and I was never able to establish a connection to it, but other instances work fine. Currently, Nitter uses guest accounts to access content on Twitter. Guest accounts expire after 30 days (IIRC) of them being created. [Guest account creation has been shut off](https://github.com/zedeus/nitter/issues/983#issuecomment-1910533435), so all existing guest accounts will be dead after 30 days max. Nitter instances with working guest accounts are not dead _yet_, but they will be.
iiTzRichie commented 2024-01-29 01:11:48 -05:00 (Migrated from github.com)

Forgive me, but why is Nitter dead? Also, I'm still able to use various instances (including ones with a guest account) just fine, so I'm a bit confused rn. If we're talking about Nitter.net exclusively, that has never worked for me and I was never able to establish a connection to it, but other instances work fine.

Currently, Nitter uses guest accounts to access content on Twitter. Guest accounts expire after 30 days (IIRC) of them being created. Guest account creation has been shut off, so all existing guest accounts will be dead after 30 days max. Nitter instances with working guest accounts are not dead yet, but they will be.

Thanks for explaining it, but I'm still majorly confused, mostly because I never understood all the lingo to begin with. And also because, I'm now reading about this online (on Twitter, Reddit, HN, Github, etc) and comments are so mixed and saying so many different things that I can't even attempt to comprehend it. Legitimately read a comment saying, "You're so stupid if you believe Nitter is dead."

> > Forgive me, but why is Nitter dead? Also, I'm still able to use various instances (including ones with a guest account) just fine, so I'm a bit confused rn. If we're talking about Nitter.net exclusively, that has never worked for me and I was never able to establish a connection to it, but other instances work fine. > > Currently, Nitter uses guest accounts to access content on Twitter. Guest accounts expire after 30 days (IIRC) of them being created. [Guest account creation has been shut off](https://github.com/zedeus/nitter/issues/983#issuecomment-1910533435), so all existing guest accounts will be dead after 30 days max. Nitter instances with working guest accounts are not dead _yet_, but they will be. Thanks for explaining it, but I'm still majorly confused, mostly because I never understood all the lingo to begin with. And also because, I'm now reading about this online (on Twitter, Reddit, HN, Github, etc) and comments are so mixed and saying so many different things that I can't even attempt to comprehend it. Legitimately read a comment saying, "You're so stupid if you believe Nitter is dead."
the-blank-x commented 2024-01-29 01:20:47 -05:00 (Migrated from github.com)

Understandable, hopefully this explanation (from when guest accounts was starting to be used) helps:

Just to be clear on what a "guest account" is, it's this strange anonymous account old versions of the Android and iOS apps used to make when you opened them for the first time. It doesn't use an email address, a password, or even a customizable username, and they cannot be viewed anywhere or logged into. For all intents and purposes it's essentially a set of temporary credentials API that work for about a month. Is is therefore not equivalent to setting up a bot farm to create fake X/Twitter accounts, and it's not quite the same route as Aurora (the Google Play store that used a very large pool of Google accounts).

Understandable, hopefully [this explanation](https://github.com/zedeus/nitter/issues/983#issuecomment-1683134811) (from when guest accounts was starting to be used) helps: > Just to be clear on what a "guest account" is, it's this strange anonymous account old versions of the Android and iOS apps used to make when you opened them for the first time. It doesn't use an email address, a password, or even a customizable username, and they cannot be viewed anywhere or logged into. For all intents and purposes it's essentially a set of temporary credentials API that work for about a month. Is is therefore not equivalent to setting up a bot farm to create fake X/Twitter accounts, and it's not quite the same route as Aurora (the Google Play store that used a very large pool of Google accounts).
randompasser commented 2024-01-29 02:09:10 -05:00 (Migrated from github.com)

@ProGamerGov Both.

Would it be feasible to downsize the project to just maintaining the ability to view profile pages and generate RSS feeds out of them? that part appears to work without the need for valid tokens.

> @ProGamerGov Both. Would it be feasible to downsize the project to just maintaining the ability to view profile pages and generate RSS feeds out of them? that part appears to work without the need for valid tokens.
hynet-mel commented 2024-01-29 07:55:47 -05:00 (Migrated from github.com)

Nitter is dead.

@zedeus Thank you so much for running this project over the last years, it made my experience of tuning in with friends their works a lot more bearable.

> Nitter is dead. @zedeus Thank you so much for running this project over the last years, it made my experience of tuning in with friends their works a lot more bearable.
expertmanofficial commented 2024-01-29 10:21:08 -05:00 (Migrated from github.com)

That's so much damn sad. Can't you try to use real Twitter accounts? Like, create one, and use it to browse Twitter via Nitter. I've seen someone recently recommended it before.

Try everything. Try everything but don't let Nitter die. It's the only tool I need to browse Twitter. Try everything. Don't let Nitter die.

That's so much damn sad. Can't you try to use real Twitter accounts? Like, create one, and use it to browse Twitter via Nitter. I've seen someone recently recommended it before. Try everything. Try everything but don't let Nitter die. It's the only tool I need to browse Twitter. Try everything. Don't let Nitter die.
BANKA2017 commented 2024-01-29 11:00:41 -05:00 (Migrated from github.com)

Can't you try to use real Twitter accounts?

If you want to use the real account, you can use https://github.com/zedeus/nitter/issues/983#issuecomment-1688495284 to get the open_account of a real account, and then write it to guest_accounts.jsonl

> Can't you try to use real Twitter accounts? If you want to use the real account, you can use https://github.com/zedeus/nitter/issues/983#issuecomment-1688495284 to get the `open_account` of a real account, and then write it to `guest_accounts.jsonl`
j-fbriere commented 2024-01-29 11:55:53 -05:00 (Migrated from github.com)

@BANKA2017 Just out of curiosity, do you know what is the expiration time of the real Twitter account token obtained from the login steps? I know it doesn't really matter because you can always login again, just curious.

@BANKA2017 Just out of curiosity, do you know what is the expiration time of the real Twitter account token obtained from the login steps? I know it doesn't really matter because you can always login again, just curious.
BANKA2017 commented 2024-01-29 12:20:50 -05:00 (Migrated from github.com)

@j-fbriere The developer FAQ mentions that access tokens are not explicitly expired

I made a mistake. The one with no clear expiration time is the bearer token, and I don’t know the expiration time of the oauth token.

~@j-fbriere The [developer FAQ](https://developer.twitter.com/en/docs/authentication/faq) mentions that *access tokens are not explicitly expired*~ I made a mistake. The one with no clear expiration time is the bearer token, and I don’t know the expiration time of the oauth token.
gschmidl commented 2024-01-29 13:17:08 -05:00 (Migrated from github.com)

I'm finally free. Thank you.

I'm finally free. Thank you.
Cragsand commented 2024-01-29 14:53:42 -05:00 (Migrated from github.com)

I just wanted to leave my thanks for all your hard work. Nitter has been a very useful resource when looking up accounts, especially for moderation purposes related to other platforms.

It's understandable how maintaining something like this is a constant uphill battle. Myself I've almost given up on convincing users to abandon the platform. Becoming "that Mastodon guy" I can relate with the struggle.
Thanks again for as long as it lasted!

I just wanted to leave my thanks for all your hard work. Nitter has been a very useful resource when looking up accounts, especially for moderation purposes related to other platforms. It's understandable how maintaining something like this is a constant uphill battle. Myself I've almost given up on convincing users to abandon the platform. Becoming "that Mastodon guy" I can relate with the struggle. Thanks again for as long as it lasted!
SavSanta commented 2024-01-29 16:51:04 -05:00 (Migrated from github.com)

Just want to say shoutout for even making this. It was great. I don't always want to login on sensitive/untrusted networks or just to look at one tweet. So using it was great! Unfortunately I know Shillicon Valley companies are creeps that want that logged in usertrackong data so this was prob the inevitable end result. Thanks for the memories!

Just want to say shoutout for even making this. It was great. I don't always want to login on sensitive/untrusted networks or just to look at one tweet. So using it was great! Unfortunately I know Shillicon Valley companies are creeps that want that logged in usertrackong data so this was prob the inevitable end result. Thanks for the memories!
compaq213 commented 2024-01-29 20:05:36 -05:00 (Migrated from github.com)

Thank you for your project man. You made Twitter usable for a while. Very very thanks for that. Because of you I manage to use Twitter. Just wanted to share that.

Thank you for your project man. You made Twitter usable for a while. Very very thanks for that. Because of you I manage to use Twitter. Just wanted to share that.
HaZeust commented 2024-01-30 01:43:33 -05:00 (Migrated from github.com)

Nitter is dead.

Thanks for your hard work.

> Nitter is dead. Thanks for your hard work.
y0nei commented 2024-01-30 07:22:28 -05:00 (Migrated from github.com)

Thank you for all your hard work on this project and the dedication on providing the best piece of software as you can to the community ❤️
I wish peace and joy upon all the maintainers and contributors, and good luck on your future projects!

Thank you for all your hard work on this project and the dedication on providing the best piece of software as you can to the community :heart: I wish peace and joy upon all the maintainers and contributors, and good luck on your future projects!
AlexOgden commented 2024-01-30 07:36:44 -05:00 (Migrated from github.com)

Nitter is dead.

RIP 🫡 🪦

> Nitter is dead. RIP 🫡 🪦
navrat-dzedaja commented 2024-01-30 08:00:09 -05:00 (Migrated from github.com)

Can't you try to use real Twitter accounts?

If you want to use the real account, you can use #983 (comment) to get the open_account of a real account, and then write it to guest_accounts.jsonl

Hi everyone!
Could you or anyone please write a tutorial or attach a link on how to run a custom Nitter instance with a real/disposable account. I discovered Nitter exactly 24 hours before zedeus wrote that Nitter is dead... I would like to provide this instance to my family and friends.

> > Can't you try to use real Twitter accounts? > > If you want to use the real account, you can use [#983 (comment)](https://github.com/zedeus/nitter/issues/983#issuecomment-1688495284) to get the `open_account` of a real account, and then write it to `guest_accounts.jsonl` Hi everyone! Could you or anyone please write a tutorial or attach a link on how to run a custom Nitter instance with a real/disposable account. I discovered Nitter exactly 24 hours before zedeus wrote that Nitter is dead... I would like to provide this instance to my family and friends.
cmj commented 2024-01-30 10:19:27 -05:00 (Migrated from github.com)

Can't you try to use real Twitter accounts?

If you want to use the real account, you can use #983 (comment) to get the open_account of a real account, and then write it to guest_accounts.jsonl

Hi everyone! Could you or anyone please write a tutorial or attach a link on how to run a custom Nitter instance with a real/disposable account. I discovered Nitter exactly 24 hours before zedeus wrote that Nitter is dead... I would like to provide this instance to my family and friends.

I've been toying around with a script and old accounts. You have to make a small edit in order to use Twitter accounts older than 30-days, as well to keep it running if your new account ages over 30 days.

I just commented out line 205 in src/auth.nim (this is not the best solution; just made it quick)
#accountPool.keepItIf(not it.hasExpired)

Build nitter

Use one of these scripts to get oauth token:
https://gist.github.com/cmj/998f59680e3549e7f181057074eccaa3
https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663

The output result goes into guest_accounts.jsonl

> > > Can't you try to use real Twitter accounts? > > > > > > If you want to use the real account, you can use [#983 (comment)](https://github.com/zedeus/nitter/issues/983#issuecomment-1688495284) to get the `open_account` of a real account, and then write it to `guest_accounts.jsonl` > > Hi everyone! Could you or anyone please write a tutorial or attach a link on how to run a custom Nitter instance with a real/disposable account. I discovered Nitter exactly 24 hours before zedeus wrote that Nitter is dead... I would like to provide this instance to my family and friends. I've been toying around with a script and old accounts. You have to make a small edit in order to use Twitter accounts older than 30-days, as well to keep it running if your new account ages over 30 days. I just commented out line 205 in src/auth.nim (this is not the best solution; just made it quick) ```#accountPool.keepItIf(not it.hasExpired)``` Build nitter Use one of these scripts to get oauth token: https://gist.github.com/cmj/998f59680e3549e7f181057074eccaa3 https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663 The output result goes into guest_accounts.jsonl
navrat-dzedaja commented 2024-01-30 15:11:51 -05:00 (Migrated from github.com)

Can't you try to use real Twitter accounts?

If you want to use the real account, you can use #983 (comment) to get the open_account of a real account, and then write it to guest_accounts.jsonl

Hi everyone! Could you or anyone please write a tutorial or attach a link on how to run a custom Nitter instance with a real/disposable account. I discovered Nitter exactly 24 hours before zedeus wrote that Nitter is dead... I would like to provide this instance to my family and friends.

I've been toying around with a script and old accounts. You have to make a small edit in order to use Twitter accounts older than 30-days, as well to keep it running if your new account ages over 30 days.

I just commented out line 250 in src/auth.nim (this is not the best solution; just made it quick) #accountPool.keepItIf(not it.hasExpired)

Build nitter

Use one of these scripts to get oauth token: https://gist.github.com/cmj/998f59680e3549e7f181057074eccaa3 #983 (comment)

The output result goes into guest_accounts.jsonl

@cmj thanks! Unfortunately your gist didn't work for me, but #983 (comment) works.

I ran the python script python twitter_login.py and copied the output values into the guest_accounts.json file as recommended here #983 (comment):

# twitter_login.py
import requests
import base64

username = ""
password = ""
TW_CONSUMER_KEY = "3nVuSoBZnx6U4vzUxf5w"
TW_CONSUMER_SECRET = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys"
TW_ANDROID_BASIC_TOKEN = "Basic {token}".format(
    token=base64.b64encode(
        (TW_CONSUMER_KEY + ":" + TW_CONSUMER_SECRET).encode()
    ).decode()
)
# print(TW_ANDROID_BASIC_TOKEN)


authentication = None
bearer_token_req = requests.post(
    "https://api.twitter.com/oauth2/token",
    headers={
        "Authorization": TW_ANDROID_BASIC_TOKEN,
        "Content-Type": "application/x-www-form-urlencoded",
    },
    data="grant_type=client_credentials",
).json()
bearer_token = " ".join(str(x) for x in bearer_token_req.values())
print(bearer_token)

# The bearer token is immutable
# Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F
guest_token = requests.post(
    "https://api.twitter.com/1.1/guest/activate.json",
    headers={
        "Authorization": bearer_token,
    },
).json()["guest_token"]
print(guest_token)

twitter_header = {
    "Authorization": bearer_token,
    "Content-Type": "application/json",
    "User-Agent": "TwitterAndroid/9.95.0-release.0 (29950000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)",
    "X-Twitter-API-Version": "5",
    "X-Twitter-Client": "TwitterAndroid",
    "X-Twitter-Client-Version": "9.95.0-release.0",
    "OS-Version": "28",
    "System-User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; ONEPLUS A3010 Build/PKQ1.181203.001)",
    "X-Twitter-Active-User": "yes",
    "X-Guest-Token": guest_token,
}

session = requests.Session()


task1 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    params={
        "flow_name": "login",
        "api_version": "1",
        "known_device_token": "",
        "sim_country_code": "us",
    },
    json={
        "flow_token": None,
        "input_flow_data": {
            "country_code": None,
            "flow_context": {
                "referrer_context": {
                    "referral_details": "utm_source=google-play&utm_medium=organic",
                    "referrer_url": "",
                },
                "start_location": {"location": "deeplink"},
            },
            "requested_variant": None,
            "target_user_id": 0,
        },
    },
    headers=twitter_header,
)

session.headers["att"] = task1.headers.get("att")
task2 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task1.json().get("flow_token"),
        "subtask_inputs": [
            {
                "enter_text": {
                    "suggestion_id": None,
                    "text": username,
                    "link": "next_link",
                },
                "subtask_id": "LoginEnterUserIdentifier",
            }
        ],
    },
    headers=twitter_header,
)

task3 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task2.json().get("flow_token"),
        "subtask_inputs": [
            {
                "enter_password": {"password": password, "link": "next_link"},
                "subtask_id": "LoginEnterPassword",
            }
        ],
    },
    headers=twitter_header,
)

task4 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task3.json().get("flow_token"),
        "subtask_inputs": [
            {
                "check_logged_in_account": {"link": "AccountDuplicationCheck_false"},
                "subtask_id": "AccountDuplicationCheck",
            }
        ],
    },
    headers=twitter_header,
).json()

for t4_subtask in task4.get("subtasks", []):
    if "open_account" in t4_subtask:
        authentication = t4_subtask["open_account"]
        break
    elif "enter_text" in t4_subtask:
        response_text = t4_subtask["enter_text"]["hint_text"]
        code = input(f"Requesting {response_text}: ")
        task5 = session.post(
            "https://api.twitter.com/1.1/onboarding/task.json",
            json={
                "flow_token": task4.get("flow_token"),
                "subtask_inputs": [
                    {
                        "enter_text": {
                            "suggestion_id": None,
                            "text": code,
                            "link": "next_link",
                        },
                        "subtask_id": "LoginAcid",
                    }
                ],
            },
            headers=twitter_header,
        ).json()
        print(task5)
        for t5_subtask in task5.get("subtasks", []):
            print(t5_subtask)
            if "open_account" in t5_subtask:
                authentication = t5_subtask["open_account"]


print(authentication)

# {
# 	'attribution_event': 'login',
# 	'known_device_token': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'next_link': {
# 		'link_id': 'next_link',
# 		'link_type': 'subtask',
# 		'subtask_id': 'SuccessExit'
# 	},
# 	'oauth_token': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'user': {
# 		'id': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'id_str': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'name': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'screen_name': 'XXXXXXXXXXXXXXXXXXXXXX'
# 	}
# }
// guest_accounts.json
[
  {
    "user": {
      "id": [REMOVED],
      "id_str": "[REMOVED]",
      "name": "[REMOVED]",
      "screen_name": "[REMOVED]"
    },
    "next_link": {
      "link_type": "subtask",
      "link_id": "next_link",
      "subtask_id": "SuccessExit"
    },
    "oauth_token": "[REMOVED]",
    "oauth_token_secret": "[REMOVED]",
    "attribution_event": "login"
  }
]

Then I cloned and compiled the Nim language (since I'm using an arm64 server and Ubuntu on OCI doesn't provide these packages) and also cloned and compiled nitter, branch guest_accounts.

And then I ran the redis container:

services:
  nitter-redis:
    image: redis:6-alpine
    container_name: nitter-redis
    command: redis-server --save 60 1 --loglevel warning
    volumes:
      - nitter-redis:/data
    restart: unless-stopped
    ports:
      - 6379:6379
    healthcheck:
      test: redis-cli ping
      interval: 30s
      timeout: 5s
      retries: 2
    user: "999:1000"
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL

volumes:
  nitter-redis:

and start ./nitter of course:

user@server:~/.git/other/nitter$ ./nitter
[accounts] Parsing JSON guest accounts file: ./guest_accounts.json
[accounts] Successfully added 1 valid accounts.
Starting Nitter at http://shitter.localhost
Connected to Redis at localhost:6379
INFO Jester is making jokes at http://0.0.0.0:8888
200 OK:  --- url: https://api.twitter.com/1.1/statuses/media_timeline.json?include_can_media_tag=1&include_cards=1&include_entities=1&include_profile_interstitial_type=0&include_quote_count=0&include_reply_count=0&include_user_entities=0&include_ext_reply_count=0&include_ext_media_color=0&cards_platform=Web-13&tweet_mode=extended&send_error_codes=1&simple_quoted_tweet=1&screen_name=elonmusk&trim_user=true&count=18
200 OK:  --- url: https://api.twitter.com/1.1/statuses/media_timeline.json?include_can_media_tag=1&include_cards=1&include_entities=1&include_profile_interstitial_type=0&include_quote_count=0&include_reply_count=0&include_user_entities=0&include_ext_reply_count=0&include_ext_media_color=0&cards_platform=Web-13&tweet_mode=extended&send_error_codes=1&simple_quoted_tweet=1&screen_name=prezidentpavel&trim_user=true&count=18
...

And it works! Even when I use a freshly created account :) So I would like to say that Nitter is NOT dead!. Anyway, I understand the privacy struggle. I wonder if a bunch of twitter accounts of some traders from the subcontinent that broke off from Gondwana over 50 million years ago and started moving north towards Eurasia might solve this problem 🤷.

> > > > Can't you try to use real Twitter accounts? > > > > > > > > > If you want to use the real account, you can use [#983 (comment)](https://github.com/zedeus/nitter/issues/983#issuecomment-1688495284) to get the `open_account` of a real account, and then write it to `guest_accounts.jsonl` > > > > > > Hi everyone! Could you or anyone please write a tutorial or attach a link on how to run a custom Nitter instance with a real/disposable account. I discovered Nitter exactly 24 hours before zedeus wrote that Nitter is dead... I would like to provide this instance to my family and friends. > > I've been toying around with a script and old accounts. You have to make a small edit in order to use Twitter accounts older than 30-days, as well to keep it running if your new account ages over 30 days. > > I just commented out line 250 in src/auth.nim (this is not the best solution; just made it quick) `#accountPool.keepItIf(not it.hasExpired)` > > Build nitter > > Use one of these scripts to get oauth token: https://gist.github.com/cmj/998f59680e3549e7f181057074eccaa3 [#983 (comment)](https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663) > > The output result goes into guest_accounts.jsonl @cmj thanks! Unfortunately your gist didn't work for me, but [`#983 (comment)`](https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663) works. I ran the python script `python twitter_login.py` and copied the output values into the `guest_accounts.json` file as recommended here [`#983 (comment)`](https://github.com/zedeus/nitter/issues/983#issuecomment-1689451309): ```python # twitter_login.py import requests import base64 username = "" password = "" TW_CONSUMER_KEY = "3nVuSoBZnx6U4vzUxf5w" TW_CONSUMER_SECRET = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys" TW_ANDROID_BASIC_TOKEN = "Basic {token}".format( token=base64.b64encode( (TW_CONSUMER_KEY + ":" + TW_CONSUMER_SECRET).encode() ).decode() ) # print(TW_ANDROID_BASIC_TOKEN) authentication = None bearer_token_req = requests.post( "https://api.twitter.com/oauth2/token", headers={ "Authorization": TW_ANDROID_BASIC_TOKEN, "Content-Type": "application/x-www-form-urlencoded", }, data="grant_type=client_credentials", ).json() bearer_token = " ".join(str(x) for x in bearer_token_req.values()) print(bearer_token) # The bearer token is immutable # Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F guest_token = requests.post( "https://api.twitter.com/1.1/guest/activate.json", headers={ "Authorization": bearer_token, }, ).json()["guest_token"] print(guest_token) twitter_header = { "Authorization": bearer_token, "Content-Type": "application/json", "User-Agent": "TwitterAndroid/9.95.0-release.0 (29950000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)", "X-Twitter-API-Version": "5", "X-Twitter-Client": "TwitterAndroid", "X-Twitter-Client-Version": "9.95.0-release.0", "OS-Version": "28", "System-User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; ONEPLUS A3010 Build/PKQ1.181203.001)", "X-Twitter-Active-User": "yes", "X-Guest-Token": guest_token, } session = requests.Session() task1 = session.post( "https://api.twitter.com/1.1/onboarding/task.json", params={ "flow_name": "login", "api_version": "1", "known_device_token": "", "sim_country_code": "us", }, json={ "flow_token": None, "input_flow_data": { "country_code": None, "flow_context": { "referrer_context": { "referral_details": "utm_source=google-play&utm_medium=organic", "referrer_url": "", }, "start_location": {"location": "deeplink"}, }, "requested_variant": None, "target_user_id": 0, }, }, headers=twitter_header, ) session.headers["att"] = task1.headers.get("att") task2 = session.post( "https://api.twitter.com/1.1/onboarding/task.json", json={ "flow_token": task1.json().get("flow_token"), "subtask_inputs": [ { "enter_text": { "suggestion_id": None, "text": username, "link": "next_link", }, "subtask_id": "LoginEnterUserIdentifier", } ], }, headers=twitter_header, ) task3 = session.post( "https://api.twitter.com/1.1/onboarding/task.json", json={ "flow_token": task2.json().get("flow_token"), "subtask_inputs": [ { "enter_password": {"password": password, "link": "next_link"}, "subtask_id": "LoginEnterPassword", } ], }, headers=twitter_header, ) task4 = session.post( "https://api.twitter.com/1.1/onboarding/task.json", json={ "flow_token": task3.json().get("flow_token"), "subtask_inputs": [ { "check_logged_in_account": {"link": "AccountDuplicationCheck_false"}, "subtask_id": "AccountDuplicationCheck", } ], }, headers=twitter_header, ).json() for t4_subtask in task4.get("subtasks", []): if "open_account" in t4_subtask: authentication = t4_subtask["open_account"] break elif "enter_text" in t4_subtask: response_text = t4_subtask["enter_text"]["hint_text"] code = input(f"Requesting {response_text}: ") task5 = session.post( "https://api.twitter.com/1.1/onboarding/task.json", json={ "flow_token": task4.get("flow_token"), "subtask_inputs": [ { "enter_text": { "suggestion_id": None, "text": code, "link": "next_link", }, "subtask_id": "LoginAcid", } ], }, headers=twitter_header, ).json() print(task5) for t5_subtask in task5.get("subtasks", []): print(t5_subtask) if "open_account" in t5_subtask: authentication = t5_subtask["open_account"] print(authentication) # { # 'attribution_event': 'login', # 'known_device_token': 'XXXXXXXXXXXXXXXXXXXXXX', # 'next_link': { # 'link_id': 'next_link', # 'link_type': 'subtask', # 'subtask_id': 'SuccessExit' # }, # 'oauth_token': 'XXXXXXXXXXXXXXXXXXXXXX', # 'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXX', # 'user': { # 'id': 'XXXXXXXXXXXXXXXXXXXXXX', # 'id_str': 'XXXXXXXXXXXXXXXXXXXXXX', # 'name': 'XXXXXXXXXXXXXXXXXXXXXX', # 'screen_name': 'XXXXXXXXXXXXXXXXXXXXXX' # } # } ``` ```json // guest_accounts.json [ { "user": { "id": [REMOVED], "id_str": "[REMOVED]", "name": "[REMOVED]", "screen_name": "[REMOVED]" }, "next_link": { "link_type": "subtask", "link_id": "next_link", "subtask_id": "SuccessExit" }, "oauth_token": "[REMOVED]", "oauth_token_secret": "[REMOVED]", "attribution_event": "login" } ] ``` Then I cloned and compiled the `Nim` language (since I'm using an arm64 server and Ubuntu on OCI doesn't provide these packages) and also cloned and compiled `nitter`, branch `guest_accounts`. And then I ran the `redis` container: ```yml services: nitter-redis: image: redis:6-alpine container_name: nitter-redis command: redis-server --save 60 1 --loglevel warning volumes: - nitter-redis:/data restart: unless-stopped ports: - 6379:6379 healthcheck: test: redis-cli ping interval: 30s timeout: 5s retries: 2 user: "999:1000" read_only: true security_opt: - no-new-privileges:true cap_drop: - ALL volumes: nitter-redis: ``` and start `./nitter` of course: ```sh user@server:~/.git/other/nitter$ ./nitter [accounts] Parsing JSON guest accounts file: ./guest_accounts.json [accounts] Successfully added 1 valid accounts. Starting Nitter at http://shitter.localhost Connected to Redis at localhost:6379 INFO Jester is making jokes at http://0.0.0.0:8888 200 OK: --- url: https://api.twitter.com/1.1/statuses/media_timeline.json?include_can_media_tag=1&include_cards=1&include_entities=1&include_profile_interstitial_type=0&include_quote_count=0&include_reply_count=0&include_user_entities=0&include_ext_reply_count=0&include_ext_media_color=0&cards_platform=Web-13&tweet_mode=extended&send_error_codes=1&simple_quoted_tweet=1&screen_name=elonmusk&trim_user=true&count=18 200 OK: --- url: https://api.twitter.com/1.1/statuses/media_timeline.json?include_can_media_tag=1&include_cards=1&include_entities=1&include_profile_interstitial_type=0&include_quote_count=0&include_reply_count=0&include_user_entities=0&include_ext_reply_count=0&include_ext_media_color=0&cards_platform=Web-13&tweet_mode=extended&send_error_codes=1&simple_quoted_tweet=1&screen_name=prezidentpavel&trim_user=true&count=18 ... ``` And it works! Even when I use a freshly created account :) So I would like to say that **`Nitter is NOT dead!`**. Anyway, I understand the privacy struggle. I wonder if a bunch of twitter accounts of some traders from the subcontinent that broke off from Gondwana over 50 million years ago and started moving north towards Eurasia might solve this problem 🤷.
cmj commented 2024-01-30 19:16:29 -05:00 (Migrated from github.com)

@navrat-dzedaja good to get feedback, thank you. Sometimes it works, seems there is some limit based on IP on my end and will work on other servers. I've had issues with the python script too so I thought I'd distill it down to something that could be understood at a glance what's happening (and make it a small script).

I'm using my 5 accounts with it, removing the nitter account age limit with no issues.

I should add: One doesn't need that many for personal use, just testing things out.

You also only need the two objects oauth_token and oauth_token_secret. The rest is just noise.

@navrat-dzedaja good to get feedback, thank you. Sometimes it works, seems there is some limit based on IP on my end and will work on other servers. I've had issues with the python script too so I thought I'd distill it down to something that could be understood at a glance what's happening (and make it a small script). I'm using my 5 accounts with it, removing the nitter account age limit with no issues. I should add: One doesn't need that many for personal use, just testing things out. You also only need the two objects oauth_token and oauth_token_secret. The rest is just noise.
Burrish commented 2024-01-31 03:58:18 -05:00 (Migrated from github.com)

RIP nitter

RIP nitter
bend-n commented 2024-01-31 04:20:12 -05:00 (Migrated from github.com)

Wait, so do we just not use twitter now?

Wait, so do we just not use twitter now?
the-blank-x commented 2024-01-31 05:29:41 -05:00 (Migrated from github.com)

I see six options:

  • Use a fork of Nitter that uses an actual account
  • Use Nitter guest_accounts with an actual account
  • Fork Nitter to use the web frontend unauthenticated (from what I've heard, this will only allow you to see single tweets, though I'm not 100% sure about that since Nitter helped me not face all the bullshit restrictions that I heard Twitter put in place)
  • Stop using Twitter
  • Cave, and use Twitter unauthenticated (see option three)
  • Cave, and use Twitter with an account
I see six options: - Use [a fork of Nitter](https://github.com/PrivacyDevel/nitter/tree/pre_guest_accounts) that uses an actual account - [Use Nitter guest_accounts with an actual account](https://github.com/zedeus/nitter/issues/1155#issuecomment-1917167072) - Fork Nitter to use the web frontend unauthenticated (from what I've heard, this will only allow you to see single tweets, though I'm not 100% sure about that since Nitter helped me not face all the bullshit restrictions that I heard Twitter put in place) - Stop using Twitter - Cave, and use Twitter unauthenticated (see option three) - Cave, and use Twitter with an account
da7a90-backup commented 2024-01-31 18:50:28 -05:00 (Migrated from github.com)

I see six options:

  • Use a fork of Nitter that uses an actual account
  • Use Nitter guest_accounts with an actual account
  • Fork Nitter to use the web frontend unauthenticated (from what I've heard, this will only allow you to see single tweets, though I'm not 100% sure about that since Nitter helped me not face all the bullshit restrictions that I heard Twitter put in place)
  • Stop using Twitter
  • Cave, and use Twitter unauthenticated (see option three)
  • Cave, and use Twitter with an account

I've reverse engineered the frontend api and syndication api multiple times and it was a solution for a while but now if you call it without providing a loggedIn user's cookie it returns scrambled results that aren't chronologically ordered.

> I see six options: > > * Use [a fork of Nitter](https://github.com/PrivacyDevel/nitter/tree/pre_guest_accounts) that uses an actual account > * [Use Nitter guest_accounts with an actual account](https://github.com/zedeus/nitter/issues/1155#issuecomment-1917167072) > * Fork Nitter to use the web frontend unauthenticated (from what I've heard, this will only allow you to see single tweets, though I'm not 100% sure about that since Nitter helped me not face all the bullshit restrictions that I heard Twitter put in place) > * Stop using Twitter > * Cave, and use Twitter unauthenticated (see option three) > * Cave, and use Twitter with an account I've reverse engineered the frontend api and syndication api multiple times and it was a solution for a while but now if you call it without providing a loggedIn user's cookie it returns scrambled results that aren't chronologically ordered.
ohonono commented 2024-01-31 20:20:56 -05:00 (Migrated from github.com)

@da7a90-backup
A small minority of 'mainstream' accounts (@BBCNews for example) will display tweets in chronological order even without login.

@da7a90-backup A small minority of 'mainstream' accounts (@BBCNews for example) will display tweets in chronological order even without login.
da7a90-backup commented 2024-01-31 20:27:42 -05:00 (Migrated from github.com)

@ohonono I've noticed that but that seems to be the exception not the rule. They've done something similar before almost a year ago but then returned to chronological order a few weeks after. I've noticed that the syndication api tends to be rate limited less than the frontend graphQl api but you need the auth_token cookie to get the most recent tweets.

@ohonono I've noticed that but that seems to be the exception not the rule. They've done something similar before almost a year ago but then returned to chronological order a few weeks after. I've noticed that the syndication api tends to be rate limited less than the frontend graphQl api but you need the `auth_token` cookie to get the most recent tweets.
BANKA2017 commented 2024-01-31 22:04:11 -05:00 (Migrated from github.com)

gold mark -> time sorting
gray/blue mark -> shuffled
other accounts -> login required

gold mark -> time sorting gray/blue mark -> shuffled other accounts -> login required
TissuePowder commented 2024-02-01 07:41:16 -05:00 (Migrated from github.com)

I am trying to set up a private nitter instance using the guest_accounts method (zedeus/nitter guest_accounts branch)
I am using https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663 to generate the json.

But I keep getting "instance has been rate limited" error. What to do next or how to bypass this?

EDIT: as @cmj suggested, commenting out the line 205 worked. YAY! https://github.com/zedeus/nitter/issues/1155#issuecomment-1917167072

I am trying to set up a private nitter instance using the guest_accounts method (zedeus/nitter guest_accounts branch) I am using https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663 to generate the json. But I keep getting "instance has been rate limited" error. What to do next or how to bypass this? EDIT: as @cmj suggested, commenting out the line 205 worked. YAY! https://github.com/zedeus/nitter/issues/1155#issuecomment-1917167072
milochristiansen commented 2024-02-01 09:03:37 -05:00 (Migrated from github.com)

nitter.net works great right now as long as you don't mind typing thisisunsafe a lot.

nitter.net works great right now as long as you don't mind typing `thisisunsafe` a lot.
lukefromdc commented 2024-02-02 02:18:31 -05:00 (Migrated from github.com)

Twitter needs to get it through their thick heads that if using Twitter not logged in doesn't return usable results and Nitter is blocked, that will NOT make people create accounts, it will make them stop using Twitter. Those who do cave might out of anger refuse to buy any product advertised on Twitter.

Twitter needs to get it through their thick heads that if using Twitter not logged in doesn't return usable results and Nitter is blocked, that will NOT make people create accounts, it will make them stop using Twitter. Those who do cave might out of anger refuse to buy any product advertised on Twitter.
lukefromdc commented 2024-02-02 02:20:06 -05:00 (Migrated from github.com)

gold mark -> time sorting gray/blue mark -> shuffled other accounts -> login required

What are these marks?

> gold mark -> time sorting gray/blue mark -> shuffled other accounts -> login required What are these marks?
cmj commented 2024-02-02 02:28:22 -05:00 (Migrated from github.com)

gold mark -> time sorting gray/blue mark -> shuffled other accounts -> login required

What are these marks?

"Checkmarks" new Twitter imposed. It's not absolute since, for instance, @NASA is a grey check (govt acct) and @AOC (grey check, govt acct) are different.

Seems there is something fishy as to what can be sorted on recently posted vs. all-time likes.

> > gold mark -> time sorting gray/blue mark -> shuffled other accounts -> login required > > What are these marks? "Checkmarks" new Twitter imposed. It's not absolute since, for instance, ```@NASA``` is a grey check (govt acct) and ```@AOC``` (grey check, govt acct) are different. Seems there is something fishy as to what can be sorted on recently posted vs. all-time likes.
lukefromdc commented 2024-02-02 02:58:50 -05:00 (Migrated from github.com)

That sounds like Musk is trying to make only tweets to paid accounts visible to those without accounts by burying the rest under a heap of spam from older posts. Yuck...

That sounds like Musk is trying to make only tweets to paid accounts visible to those without accounts by burying the rest under a heap of spam from older posts. Yuck...
minihoot commented 2024-02-02 19:09:27 -05:00 (Migrated from github.com)

i might aswell deactivate my twitter

i might aswell deactivate my twitter
nukeop commented 2024-02-03 16:38:28 -05:00 (Migrated from github.com)

Nitter is dead.

"no"

> Nitter is dead. "no"
NetworkWebMasters commented 2024-02-03 16:50:54 -05:00 (Migrated from github.com)

nitter.net still working perfectly with nitter-harvest, ignore expired certificate.

nitter.net still working perfectly with nitter-harvest, ignore expired certificate.
ghost commented 2024-02-04 03:55:00 -05:00 (Migrated from github.com)

nitter.net still working perfectly with nitter-harvest, ignore expired certificate.

Until the end of February

> nitter.net still working perfectly with nitter-harvest, ignore expired certificate. Until the end of February
vehosah commented 2024-02-07 12:37:22 -05:00 (Migrated from github.com)

And where can we go now?

And where can we go now?
ghost commented 2024-02-08 10:41:30 -05:00 (Migrated from github.com)

Some nitter instances will continue to function as they use twitter accounts instead of guest accounts

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: vehosah @.>
Sent: Wednesday, February 7, 2024 5:37:41 PM
To: zedeus/nitter @.
>
Cc: HCJ @.>; Comment @.>
Subject: Re: [zedeus/nitter] nitter.net certificate expired on 15:08:30 GMT (Issue #1155)

And where can we go now?

—
Reply to this email directly, view it on GitHubhttps://github.com/zedeus/nitter/issues/1155#issuecomment-1932552795, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BD45TZ4LBJMLMJ3OI2RCWV3YSO3WLAVCNFSM6AAAAABCNN2NUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZSGU2TENZZGU.
You are receiving this because you commented.Message ID: @.***>

Some nitter instances will continue to function as they use twitter accounts instead of guest accounts Sent from Outlook for Android<https://aka.ms/AAb9ysg> ________________________________ From: vehosah ***@***.***> Sent: Wednesday, February 7, 2024 5:37:41 PM To: zedeus/nitter ***@***.***> Cc: HCJ ***@***.***>; Comment ***@***.***> Subject: Re: [zedeus/nitter] nitter.net certificate expired on 15:08:30 GMT (Issue #1155) And where can we go now? — Reply to this email directly, view it on GitHub<https://github.com/zedeus/nitter/issues/1155#issuecomment-1932552795>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BD45TZ4LBJMLMJ3OI2RCWV3YSO3WLAVCNFSM6AAAAABCNN2NUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZSGU2TENZZGU>. You are receiving this because you commented.Message ID: ***@***.***>
tahaafarooq commented 2024-02-09 09:24:12 -05:00 (Migrated from github.com)

whyyyy nitter dieed :(

whyyyy nitter dieed :(
iiTzRichie commented 2024-02-10 20:00:55 -05:00 (Migrated from github.com)

Some nitter instances will continue to function as they use twitter accounts instead of guest accounts

Which instances exactly? Could someone document a list?

> Some nitter instances will continue to function as they use twitter accounts instead of guest accounts Which instances exactly? Could someone document a list?
ghost commented 2024-02-11 00:00:54 -05:00 (Migrated from github.com)

I would use it to follow the agenda with its fast and simple interface. Since browsing without an account is not allowed in x, it naturally does not work in these clients. I hope a solution can be found in the future. Thank you for your service.

I would use it to follow the agenda with its fast and simple interface. Since browsing without an account is not allowed in x, it naturally does not work in these clients. I hope a solution can be found in the future. Thank you for your service.
burruplambert commented 2024-02-16 12:04:02 -05:00 (Migrated from github.com)

syndication

Hi @da7a90-backup , is there any way of contacting you privately?

> syndication Hi @da7a90-backup , is there any way of contacting you privately?
Rudicron commented 2024-02-18 21:48:38 -05:00 (Migrated from github.com)

The output result goes into guest_accounts.jsonl

@cmj thanks! Unfortunately your gist didn't work for me, but #983 (comment) works.

I ran the python script python twitter_login.py and copied the output values into the guest_accounts.json file as recommended here #983 (comment):

# twitter_login.py
import requests
import base64

username = ""
password = ""
TW_CONSUMER_KEY = "3nVuSoBZnx6U4vzUxf5w"
TW_CONSUMER_SECRET = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys"
TW_ANDROID_BASIC_TOKEN = "Basic {token}".format(
    token=base64.b64encode(
        (TW_CONSUMER_KEY + ":" + TW_CONSUMER_SECRET).encode()
    ).decode()
)
# print(TW_ANDROID_BASIC_TOKEN)


authentication = None
bearer_token_req = requests.post(
    "https://api.twitter.com/oauth2/token",
    headers={
        "Authorization": TW_ANDROID_BASIC_TOKEN,
        "Content-Type": "application/x-www-form-urlencoded",
    },
    data="grant_type=client_credentials",
).json()
bearer_token = " ".join(str(x) for x in bearer_token_req.values())
print(bearer_token)

# The bearer token is immutable
# Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F
guest_token = requests.post(
    "https://api.twitter.com/1.1/guest/activate.json",
    headers={
        "Authorization": bearer_token,
    },
).json()["guest_token"]
print(guest_token)

twitter_header = {
    "Authorization": bearer_token,
    "Content-Type": "application/json",
    "User-Agent": "TwitterAndroid/9.95.0-release.0 (29950000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)",
    "X-Twitter-API-Version": "5",
    "X-Twitter-Client": "TwitterAndroid",
    "X-Twitter-Client-Version": "9.95.0-release.0",
    "OS-Version": "28",
    "System-User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; ONEPLUS A3010 Build/PKQ1.181203.001)",
    "X-Twitter-Active-User": "yes",
    "X-Guest-Token": guest_token,
}

session = requests.Session()


task1 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    params={
        "flow_name": "login",
        "api_version": "1",
        "known_device_token": "",
        "sim_country_code": "us",
    },
    json={
        "flow_token": None,
        "input_flow_data": {
            "country_code": None,
            "flow_context": {
                "referrer_context": {
                    "referral_details": "utm_source=google-play&utm_medium=organic",
                    "referrer_url": "",
                },
                "start_location": {"location": "deeplink"},
            },
            "requested_variant": None,
            "target_user_id": 0,
        },
    },
    headers=twitter_header,
)

session.headers["att"] = task1.headers.get("att")
task2 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task1.json().get("flow_token"),
        "subtask_inputs": [
            {
                "enter_text": {
                    "suggestion_id": None,
                    "text": username,
                    "link": "next_link",
                },
                "subtask_id": "LoginEnterUserIdentifier",
            }
        ],
    },
    headers=twitter_header,
)

task3 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task2.json().get("flow_token"),
        "subtask_inputs": [
            {
                "enter_password": {"password": password, "link": "next_link"},
                "subtask_id": "LoginEnterPassword",
            }
        ],
    },
    headers=twitter_header,
)

task4 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task3.json().get("flow_token"),
        "subtask_inputs": [
            {
                "check_logged_in_account": {"link": "AccountDuplicationCheck_false"},
                "subtask_id": "AccountDuplicationCheck",
            }
        ],
    },
    headers=twitter_header,
).json()

for t4_subtask in task4.get("subtasks", []):
    if "open_account" in t4_subtask:
        authentication = t4_subtask["open_account"]
        break
    elif "enter_text" in t4_subtask:
        response_text = t4_subtask["enter_text"]["hint_text"]
        code = input(f"Requesting {response_text}: ")
        task5 = session.post(
            "https://api.twitter.com/1.1/onboarding/task.json",
            json={
                "flow_token": task4.get("flow_token"),
                "subtask_inputs": [
                    {
                        "enter_text": {
                            "suggestion_id": None,
                            "text": code,
                            "link": "next_link",
                        },
                        "subtask_id": "LoginAcid",
                    }
                ],
            },
            headers=twitter_header,
        ).json()
        print(task5)
        for t5_subtask in task5.get("subtasks", []):
            print(t5_subtask)
            if "open_account" in t5_subtask:
                authentication = t5_subtask["open_account"]


print(authentication)

# {
# 	'attribution_event': 'login',
# 	'known_device_token': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'next_link': {
# 		'link_id': 'next_link',
# 		'link_type': 'subtask',
# 		'subtask_id': 'SuccessExit'
# 	},
# 	'oauth_token': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'user': {
# 		'id': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'id_str': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'name': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'screen_name': 'XXXXXXXXXXXXXXXXXXXXXX'
# 	}
# }

If you replace the
"subtask_id": "LoginAcid",
in task 4 with
"subtask_id": "LoginTwoFactorAuthChallenge",
this script will work for accounts that have 2FA setup; the script will ask for the 2FA code, and then it should give you a valid token.

(assuming that you haven't already tried a bunch of times in the last ~30 minutes or so.)

> > The output result goes into guest_accounts.jsonl > > @cmj thanks! Unfortunately your gist didn't work for me, but [`#983 (comment)`](https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663) works. > > I ran the python script `python twitter_login.py` and copied the output values into the `guest_accounts.json` file as recommended here [`#983 (comment)`](https://github.com/zedeus/nitter/issues/983#issuecomment-1689451309): > > ```python > # twitter_login.py > import requests > import base64 > > username = "" > password = "" > TW_CONSUMER_KEY = "3nVuSoBZnx6U4vzUxf5w" > TW_CONSUMER_SECRET = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys" > TW_ANDROID_BASIC_TOKEN = "Basic {token}".format( > token=base64.b64encode( > (TW_CONSUMER_KEY + ":" + TW_CONSUMER_SECRET).encode() > ).decode() > ) > # print(TW_ANDROID_BASIC_TOKEN) > > > authentication = None > bearer_token_req = requests.post( > "https://api.twitter.com/oauth2/token", > headers={ > "Authorization": TW_ANDROID_BASIC_TOKEN, > "Content-Type": "application/x-www-form-urlencoded", > }, > data="grant_type=client_credentials", > ).json() > bearer_token = " ".join(str(x) for x in bearer_token_req.values()) > print(bearer_token) > > # The bearer token is immutable > # Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F > guest_token = requests.post( > "https://api.twitter.com/1.1/guest/activate.json", > headers={ > "Authorization": bearer_token, > }, > ).json()["guest_token"] > print(guest_token) > > twitter_header = { > "Authorization": bearer_token, > "Content-Type": "application/json", > "User-Agent": "TwitterAndroid/9.95.0-release.0 (29950000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)", > "X-Twitter-API-Version": "5", > "X-Twitter-Client": "TwitterAndroid", > "X-Twitter-Client-Version": "9.95.0-release.0", > "OS-Version": "28", > "System-User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; ONEPLUS A3010 Build/PKQ1.181203.001)", > "X-Twitter-Active-User": "yes", > "X-Guest-Token": guest_token, > } > > session = requests.Session() > > > task1 = session.post( > "https://api.twitter.com/1.1/onboarding/task.json", > params={ > "flow_name": "login", > "api_version": "1", > "known_device_token": "", > "sim_country_code": "us", > }, > json={ > "flow_token": None, > "input_flow_data": { > "country_code": None, > "flow_context": { > "referrer_context": { > "referral_details": "utm_source=google-play&utm_medium=organic", > "referrer_url": "", > }, > "start_location": {"location": "deeplink"}, > }, > "requested_variant": None, > "target_user_id": 0, > }, > }, > headers=twitter_header, > ) > > session.headers["att"] = task1.headers.get("att") > task2 = session.post( > "https://api.twitter.com/1.1/onboarding/task.json", > json={ > "flow_token": task1.json().get("flow_token"), > "subtask_inputs": [ > { > "enter_text": { > "suggestion_id": None, > "text": username, > "link": "next_link", > }, > "subtask_id": "LoginEnterUserIdentifier", > } > ], > }, > headers=twitter_header, > ) > > task3 = session.post( > "https://api.twitter.com/1.1/onboarding/task.json", > json={ > "flow_token": task2.json().get("flow_token"), > "subtask_inputs": [ > { > "enter_password": {"password": password, "link": "next_link"}, > "subtask_id": "LoginEnterPassword", > } > ], > }, > headers=twitter_header, > ) > > task4 = session.post( > "https://api.twitter.com/1.1/onboarding/task.json", > json={ > "flow_token": task3.json().get("flow_token"), > "subtask_inputs": [ > { > "check_logged_in_account": {"link": "AccountDuplicationCheck_false"}, > "subtask_id": "AccountDuplicationCheck", > } > ], > }, > headers=twitter_header, > ).json() > > for t4_subtask in task4.get("subtasks", []): > if "open_account" in t4_subtask: > authentication = t4_subtask["open_account"] > break > elif "enter_text" in t4_subtask: > response_text = t4_subtask["enter_text"]["hint_text"] > code = input(f"Requesting {response_text}: ") > task5 = session.post( > "https://api.twitter.com/1.1/onboarding/task.json", > json={ > "flow_token": task4.get("flow_token"), > "subtask_inputs": [ > { > "enter_text": { > "suggestion_id": None, > "text": code, > "link": "next_link", > }, > "subtask_id": "LoginAcid", > } > ], > }, > headers=twitter_header, > ).json() > print(task5) > for t5_subtask in task5.get("subtasks", []): > print(t5_subtask) > if "open_account" in t5_subtask: > authentication = t5_subtask["open_account"] > > > print(authentication) > > # { > # 'attribution_event': 'login', > # 'known_device_token': 'XXXXXXXXXXXXXXXXXXXXXX', > # 'next_link': { > # 'link_id': 'next_link', > # 'link_type': 'subtask', > # 'subtask_id': 'SuccessExit' > # }, > # 'oauth_token': 'XXXXXXXXXXXXXXXXXXXXXX', > # 'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXX', > # 'user': { > # 'id': 'XXXXXXXXXXXXXXXXXXXXXX', > # 'id_str': 'XXXXXXXXXXXXXXXXXXXXXX', > # 'name': 'XXXXXXXXXXXXXXXXXXXXXX', > # 'screen_name': 'XXXXXXXXXXXXXXXXXXXXXX' > # } > # } > ``` If you replace the `"subtask_id": "LoginAcid",` in task 4 with `"subtask_id": "LoginTwoFactorAuthChallenge",` this script will work for accounts that have 2FA setup; the script will ask for the 2FA code, and then it should give you a valid token. (assuming that you haven't already tried a bunch of times in the last ~30 minutes or so.)
beansofhell commented 2024-02-19 18:56:44 -05:00 (Migrated from github.com)

The output result goes into guest_accounts.jsonl

@cmj thanks! Unfortunately your gist didn't work for me, but #983 (comment) works.
I ran the python script python twitter_login.py and copied the output values into the guest_accounts.json file as recommended here #983 (comment):

# twitter_login.py
import requests
import base64

username = ""
password = ""
TW_CONSUMER_KEY = "3nVuSoBZnx6U4vzUxf5w"
TW_CONSUMER_SECRET = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys"
TW_ANDROID_BASIC_TOKEN = "Basic {token}".format(
    token=base64.b64encode(
        (TW_CONSUMER_KEY + ":" + TW_CONSUMER_SECRET).encode()
    ).decode()
)
# print(TW_ANDROID_BASIC_TOKEN)


authentication = None
bearer_token_req = requests.post(
    "https://api.twitter.com/oauth2/token",
    headers={
        "Authorization": TW_ANDROID_BASIC_TOKEN,
        "Content-Type": "application/x-www-form-urlencoded",
    },
    data="grant_type=client_credentials",
).json()
bearer_token = " ".join(str(x) for x in bearer_token_req.values())
print(bearer_token)

# The bearer token is immutable
# Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F
guest_token = requests.post(
    "https://api.twitter.com/1.1/guest/activate.json",
    headers={
        "Authorization": bearer_token,
    },
).json()["guest_token"]
print(guest_token)

twitter_header = {
    "Authorization": bearer_token,
    "Content-Type": "application/json",
    "User-Agent": "TwitterAndroid/9.95.0-release.0 (29950000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)",
    "X-Twitter-API-Version": "5",
    "X-Twitter-Client": "TwitterAndroid",
    "X-Twitter-Client-Version": "9.95.0-release.0",
    "OS-Version": "28",
    "System-User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; ONEPLUS A3010 Build/PKQ1.181203.001)",
    "X-Twitter-Active-User": "yes",
    "X-Guest-Token": guest_token,
}

session = requests.Session()


task1 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    params={
        "flow_name": "login",
        "api_version": "1",
        "known_device_token": "",
        "sim_country_code": "us",
    },
    json={
        "flow_token": None,
        "input_flow_data": {
            "country_code": None,
            "flow_context": {
                "referrer_context": {
                    "referral_details": "utm_source=google-play&utm_medium=organic",
                    "referrer_url": "",
                },
                "start_location": {"location": "deeplink"},
            },
            "requested_variant": None,
            "target_user_id": 0,
        },
    },
    headers=twitter_header,
)

session.headers["att"] = task1.headers.get("att")
task2 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task1.json().get("flow_token"),
        "subtask_inputs": [
            {
                "enter_text": {
                    "suggestion_id": None,
                    "text": username,
                    "link": "next_link",
                },
                "subtask_id": "LoginEnterUserIdentifier",
            }
        ],
    },
    headers=twitter_header,
)

task3 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task2.json().get("flow_token"),
        "subtask_inputs": [
            {
                "enter_password": {"password": password, "link": "next_link"},
                "subtask_id": "LoginEnterPassword",
            }
        ],
    },
    headers=twitter_header,
)

task4 = session.post(
    "https://api.twitter.com/1.1/onboarding/task.json",
    json={
        "flow_token": task3.json().get("flow_token"),
        "subtask_inputs": [
            {
                "check_logged_in_account": {"link": "AccountDuplicationCheck_false"},
                "subtask_id": "AccountDuplicationCheck",
            }
        ],
    },
    headers=twitter_header,
).json()

for t4_subtask in task4.get("subtasks", []):
    if "open_account" in t4_subtask:
        authentication = t4_subtask["open_account"]
        break
    elif "enter_text" in t4_subtask:
        response_text = t4_subtask["enter_text"]["hint_text"]
        code = input(f"Requesting {response_text}: ")
        task5 = session.post(
            "https://api.twitter.com/1.1/onboarding/task.json",
            json={
                "flow_token": task4.get("flow_token"),
                "subtask_inputs": [
                    {
                        "enter_text": {
                            "suggestion_id": None,
                            "text": code,
                            "link": "next_link",
                        },
                        "subtask_id": "LoginAcid",
                    }
                ],
            },
            headers=twitter_header,
        ).json()
        print(task5)
        for t5_subtask in task5.get("subtasks", []):
            print(t5_subtask)
            if "open_account" in t5_subtask:
                authentication = t5_subtask["open_account"]


print(authentication)

# {
# 	'attribution_event': 'login',
# 	'known_device_token': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'next_link': {
# 		'link_id': 'next_link',
# 		'link_type': 'subtask',
# 		'subtask_id': 'SuccessExit'
# 	},
# 	'oauth_token': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXX',
# 	'user': {
# 		'id': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'id_str': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'name': 'XXXXXXXXXXXXXXXXXXXXXX',
# 		'screen_name': 'XXXXXXXXXXXXXXXXXXXXXX'
# 	}
# }

If you replace the "subtask_id": "LoginAcid", in task 4 with "subtask_id": "LoginTwoFactorAuthChallenge", this script will work for accounts that have 2FA setup; the script will ask for the 2FA code, and then it should give you a valid token.

(assuming that you haven't already tried a bunch of times in the last ~30 minutes or so.)

they likely have a blacklist of ips. and somehow detect if a user is using a VPS
make sure its a docker on your own machine
use
https://github.com/sekai-soft/freebird

it works for me... but not on my VPS, alltho likely because I am using ARM so IDK

im able to use it... and you can use tailscale on it too !!!!!!!

image

> > > The output result goes into guest_accounts.jsonl > > > > > > @cmj thanks! Unfortunately your gist didn't work for me, but [`#983 (comment)`](https://github.com/zedeus/nitter/issues/983#issuecomment-1914616663) works. > > I ran the python script `python twitter_login.py` and copied the output values into the `guest_accounts.json` file as recommended here [`#983 (comment)`](https://github.com/zedeus/nitter/issues/983#issuecomment-1689451309): > > ```python > > # twitter_login.py > > import requests > > import base64 > > > > username = "" > > password = "" > > TW_CONSUMER_KEY = "3nVuSoBZnx6U4vzUxf5w" > > TW_CONSUMER_SECRET = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys" > > TW_ANDROID_BASIC_TOKEN = "Basic {token}".format( > > token=base64.b64encode( > > (TW_CONSUMER_KEY + ":" + TW_CONSUMER_SECRET).encode() > > ).decode() > > ) > > # print(TW_ANDROID_BASIC_TOKEN) > > > > > > authentication = None > > bearer_token_req = requests.post( > > "https://api.twitter.com/oauth2/token", > > headers={ > > "Authorization": TW_ANDROID_BASIC_TOKEN, > > "Content-Type": "application/x-www-form-urlencoded", > > }, > > data="grant_type=client_credentials", > > ).json() > > bearer_token = " ".join(str(x) for x in bearer_token_req.values()) > > print(bearer_token) > > > > # The bearer token is immutable > > # Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F > > guest_token = requests.post( > > "https://api.twitter.com/1.1/guest/activate.json", > > headers={ > > "Authorization": bearer_token, > > }, > > ).json()["guest_token"] > > print(guest_token) > > > > twitter_header = { > > "Authorization": bearer_token, > > "Content-Type": "application/json", > > "User-Agent": "TwitterAndroid/9.95.0-release.0 (29950000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)", > > "X-Twitter-API-Version": "5", > > "X-Twitter-Client": "TwitterAndroid", > > "X-Twitter-Client-Version": "9.95.0-release.0", > > "OS-Version": "28", > > "System-User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; ONEPLUS A3010 Build/PKQ1.181203.001)", > > "X-Twitter-Active-User": "yes", > > "X-Guest-Token": guest_token, > > } > > > > session = requests.Session() > > > > > > task1 = session.post( > > "https://api.twitter.com/1.1/onboarding/task.json", > > params={ > > "flow_name": "login", > > "api_version": "1", > > "known_device_token": "", > > "sim_country_code": "us", > > }, > > json={ > > "flow_token": None, > > "input_flow_data": { > > "country_code": None, > > "flow_context": { > > "referrer_context": { > > "referral_details": "utm_source=google-play&utm_medium=organic", > > "referrer_url": "", > > }, > > "start_location": {"location": "deeplink"}, > > }, > > "requested_variant": None, > > "target_user_id": 0, > > }, > > }, > > headers=twitter_header, > > ) > > > > session.headers["att"] = task1.headers.get("att") > > task2 = session.post( > > "https://api.twitter.com/1.1/onboarding/task.json", > > json={ > > "flow_token": task1.json().get("flow_token"), > > "subtask_inputs": [ > > { > > "enter_text": { > > "suggestion_id": None, > > "text": username, > > "link": "next_link", > > }, > > "subtask_id": "LoginEnterUserIdentifier", > > } > > ], > > }, > > headers=twitter_header, > > ) > > > > task3 = session.post( > > "https://api.twitter.com/1.1/onboarding/task.json", > > json={ > > "flow_token": task2.json().get("flow_token"), > > "subtask_inputs": [ > > { > > "enter_password": {"password": password, "link": "next_link"}, > > "subtask_id": "LoginEnterPassword", > > } > > ], > > }, > > headers=twitter_header, > > ) > > > > task4 = session.post( > > "https://api.twitter.com/1.1/onboarding/task.json", > > json={ > > "flow_token": task3.json().get("flow_token"), > > "subtask_inputs": [ > > { > > "check_logged_in_account": {"link": "AccountDuplicationCheck_false"}, > > "subtask_id": "AccountDuplicationCheck", > > } > > ], > > }, > > headers=twitter_header, > > ).json() > > > > for t4_subtask in task4.get("subtasks", []): > > if "open_account" in t4_subtask: > > authentication = t4_subtask["open_account"] > > break > > elif "enter_text" in t4_subtask: > > response_text = t4_subtask["enter_text"]["hint_text"] > > code = input(f"Requesting {response_text}: ") > > task5 = session.post( > > "https://api.twitter.com/1.1/onboarding/task.json", > > json={ > > "flow_token": task4.get("flow_token"), > > "subtask_inputs": [ > > { > > "enter_text": { > > "suggestion_id": None, > > "text": code, > > "link": "next_link", > > }, > > "subtask_id": "LoginAcid", > > } > > ], > > }, > > headers=twitter_header, > > ).json() > > print(task5) > > for t5_subtask in task5.get("subtasks", []): > > print(t5_subtask) > > if "open_account" in t5_subtask: > > authentication = t5_subtask["open_account"] > > > > > > print(authentication) > > > > # { > > # 'attribution_event': 'login', > > # 'known_device_token': 'XXXXXXXXXXXXXXXXXXXXXX', > > # 'next_link': { > > # 'link_id': 'next_link', > > # 'link_type': 'subtask', > > # 'subtask_id': 'SuccessExit' > > # }, > > # 'oauth_token': 'XXXXXXXXXXXXXXXXXXXXXX', > > # 'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXX', > > # 'user': { > > # 'id': 'XXXXXXXXXXXXXXXXXXXXXX', > > # 'id_str': 'XXXXXXXXXXXXXXXXXXXXXX', > > # 'name': 'XXXXXXXXXXXXXXXXXXXXXX', > > # 'screen_name': 'XXXXXXXXXXXXXXXXXXXXXX' > > # } > > # } > > ``` > > If you replace the `"subtask_id": "LoginAcid",` in task 4 with `"subtask_id": "LoginTwoFactorAuthChallenge",` this script will work for accounts that have 2FA setup; the script will ask for the 2FA code, and then it should give you a valid token. > > (assuming that you haven't already tried a bunch of times in the last ~30 minutes or so.) they likely have a blacklist of ips. and somehow detect if a user is using a VPS make sure its a docker on your own machine use https://github.com/sekai-soft/freebird it works for me... but not on my VPS, alltho likely because I am using ARM so IDK im able to use it... and you can use tailscale on it too !!!!!!! ![image](https://github.com/zedeus/nitter/assets/126506518/b027feb3-8898-4e24-91ad-8ad8781d4477)
ProGamerGov commented 2024-02-19 22:22:06 -05:00 (Migrated from github.com)

How it feels watching all the Nitter instances die out, like the timelines from Loki:

loki-gif360p

Source video with somber music: https://www.youtube.com/watch?v=UKAuH-fEXPE

How it feels watching all the Nitter instances die out, like the timelines from Loki: ![loki-gif360p](https://github.com/zedeus/nitter/assets/10626398/13b4f156-336e-4ff8-9f20-f7f44e8efff3) Source video with somber music: https://www.youtube.com/watch?v=UKAuH-fEXPE
iiTzRichie commented 2024-02-20 11:46:08 -05:00 (Migrated from github.com)

Looks like most instances have started failing with the exception of a select few, but their time is short. Thank you @zedeus (and other devs) for your work 🫡.

Anyone got any suggestions for Twitter RSS alternatives? I do have a Twitter account, but I'm not experienced enough with coding and all that to set up a private Nitter instance. I guess if all else fails then I really will have to go back to that shithole.

(Wasn't there something about Jack, and other ex people from Twitter, starting anew and making another Twitter-like platform?)

(There is also Threads, which is on the Fediverse, meaning that it actually fully supports third-party instances, but honestly I see Threads eventually shutting down)

Looks like most instances have started failing with the exception of a select few, but their time is short. Thank you @zedeus (and other devs) for your work 🫡. Anyone got any suggestions for Twitter RSS alternatives? I do have a Twitter account, but I'm not experienced enough with coding and all that to set up a private Nitter instance. I guess if all else fails then I really will have to go back to that shithole. (Wasn't there something about Jack, and other ex people from Twitter, starting anew and making another Twitter-like platform?) (There is also Threads, which is on the Fediverse, meaning that it actually fully supports third-party instances, but honestly I see Threads eventually shutting down)
lukefromdc commented 2024-02-20 13:23:20 -05:00 (Migrated from github.com)

I have warned people that once all nitter instances stop working, I will no longer be able to see anything they post to Twitter without a direct link to that exact tweet. For me the reason for using Nitter has been to be able to see chronological timelines without an account.

I have warned people that once all nitter instances stop working, I will no longer be able to see anything they post to Twitter without a direct link to that exact tweet. For me the reason for using Nitter has been to be able to see chronological timelines without an account.
uberspringer commented 2024-03-24 11:10:38 -04:00 (Migrated from github.com)

How come sotwe.com still works? I have no clue about the technicalities but there I can view at least recent tweets without an account. You just need to refresh the page (using the browser not the built in refresh button) if it does not turn up results.

How come sotwe.com still works? I have no clue about the technicalities but there I can view at least recent tweets without an account. You just need to refresh the page (using the browser not the built in refresh button) if it does not turn up results.
adam0white commented 2024-03-24 12:49:30 -04:00 (Migrated from github.com)

I think the above comment is spam / advertisement, feel free to ignore. Made from a new account for a random website.

I think the above comment is spam / advertisement, feel free to ignore. Made from a new account for a random website.
nukeop commented 2024-03-24 12:56:37 -04:00 (Migrated from github.com)

I don't think so, looks like a genuine post. Don't make stuff up

I don't think so, looks like a genuine post. Don't make stuff up
uberspringer commented 2024-03-24 15:06:30 -04:00 (Migrated from github.com)

I think the above comment is spam / advertisement, feel free to ignore. Made from a new account for a random website.

Not spamming or shilling. The site works and doesn't seem to try to sell me something, although I wouldn't know since I use uBlock.

Genuinely curious how they can accomplish this and if it's possible for Nitter to do the same. I have no clue who runs it and there is barely any information about it online. I thought to bring it to attention since it was mentioned that there does not seem to be a way to revive nitter this time. So why can't Nitter do what Sotwe does?

> I think the above comment is spam / advertisement, feel free to ignore. Made from a new account for a random website. Not spamming or shilling. The site works and doesn't seem to try to sell me something, although I wouldn't know since I use uBlock. Genuinely curious how they can accomplish this and if it's possible for Nitter to do the same. I have no clue who runs it and there is barely any information about it online. I thought to bring it to attention since it was mentioned that there does not seem to be a way to revive nitter this time. So why can't Nitter do what Sotwe does?
ghost commented 2024-03-24 15:28:11 -04:00 (Migrated from github.com)

I think the above comment is spam / advertisement, feel free to ignore. Made from a new account for a random website.

Not spamming or shilling. The site works and doesn't seem to try to sell me something, although I wouldn't know since I use uBlock.

Genuinely curious how they can accomplish this and if it's possible for Nitter to do the same. I have no clue who runs it and there is barely any information about it online. I thought to bring it to attention since it was mentioned that there does not seem to be a way to revive nitter this time. So why can't Nitter do what Sotwe does?

Without UBO it does seem to try and sell you an membership on the https://www.sotwe.com/pricing page

> > I think the above comment is spam / advertisement, feel free to ignore. Made from a new account for a random website. > > Not spamming or shilling. The site works and doesn't seem to try to sell me something, although I wouldn't know since I use uBlock. > > Genuinely curious how they can accomplish this and if it's possible for Nitter to do the same. I have no clue who runs it and there is barely any information about it online. I thought to bring it to attention since it was mentioned that there does not seem to be a way to revive nitter this time. So why can't Nitter do what Sotwe does? Without UBO it does seem to try and sell you an membership on the https://www.sotwe.com/pricing page
nukeop commented 2024-03-24 15:33:40 -04:00 (Migrated from github.com)

And? They provide a service that many here would like to use.

And? They provide a service that many here would like to use.
lukefromdc commented 2024-03-25 01:42:27 -04:00 (Migrated from github.com)

NoScript and Disconnect together also disable the attempt to sell a membership by sotwe.com and it does in fact work, no idea for how long, no idea if it's safe for anyone using a default browser with all the trackers and 3ed party crap turned on. If they ever require a membership I will treat that as a shutdown

NoScript and Disconnect together also disable the attempt to sell a membership by sotwe.com and it does in fact work, no idea for how long, no idea if it's safe for anyone using a default browser with all the trackers and 3ed party crap turned on. If they ever require a membership I will treat that as a shutdown
uberspringer commented 2024-03-29 14:27:05 -04:00 (Migrated from github.com)

Sotwe seems to not work for me anymore even after changing IPs. Any ideas why? Is it the same for anyone else?

Sotwe seems to not work for me anymore even after changing IPs. Any ideas why? Is it the same for anyone else?
lukefromdc commented 2024-03-29 15:31:58 -04:00 (Migrated from github.com)

They seem to have set up Cloudflare either incorrectly so everything gets blocked, or they may be blocking all nondefault browser configurations that could indicate someone who cannot be monetized. I think they must have changed their settings from "challenge" to "block," as I always got the hcaptcha challenge with my browsers.

No way I am going to expose a default browser to Sotwe or to Twitter, I don't do ad-enabled anything. Unless another solution is found, I am back to considering Twitter as DOWN except for following direct links to individual tweets. I normally respond to Cloudflare challenges by closing the tab anyway.

They seem to have set up Cloudflare either incorrectly so everything gets blocked, or they may be blocking all nondefault browser configurations that could indicate someone who cannot be monetized. I think they must have changed their settings from "challenge" to "block," as I always got the hcaptcha challenge with my browsers. No way I am going to expose a default browser to Sotwe or to Twitter, I don't do ad-enabled anything. Unless another solution is found, I am back to considering Twitter as DOWN except for following direct links to individual tweets. I normally respond to Cloudflare challenges by closing the tab anyway.
nukeop commented 2024-03-29 16:04:59 -04:00 (Migrated from github.com)

You can just install uBlock and block ads.

You can just install uBlock and block ads.
lukefromdc commented 2024-03-29 20:56:36 -04:00 (Migrated from github.com)

I have very comprehensive ad and tracker blocking on all browsers. Not lifting any of that to pass Cloudflare blocks.

I have very comprehensive ad and tracker blocking on all browsers. Not lifting any of that to pass Cloudflare blocks.
zedeus commented 2025-02-05 14:20:03 -05:00 (Migrated from github.com)

nitter.net is now back, closing.

nitter.net is now back, closing.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PAS/nitter#1155
No description provided.