PrivacyDevel/nitter

Can this be used with user account for a private instance?

Closed this issue · 16 comments

What would be an example of the config needed to run this repo with a user account?

I've pretty much just used this script to generate the content for my guest_accounts.jsonl: zedeus#983 (comment)
Fill in your username and password and execute it once for each Twitter account, copy the required fields and paste it into your guest_accounts.jsonl like so:

{"oauth_token": "xxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "oauth_token_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
{"oauth_token": "xxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "oauth_token_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
{"oauth_token": "xxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "oauth_token_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}

where should the guest_accounts.jsonl be located?

It should be put in the same folder where the nitter binary is.

where should the guest_accounts.jsonl be located?

Put it wherever you want and set the NITTER_ACCOUNTS_FILE environment variable to that location. Otherwise nitter will look at the current directory.

Related question, is using cookie values from a logged-in user supposed to work when you build from the head of master? Nitter still won't run without the guest tokens, and I get segfaults when I try to use other branches and leave them out

Related question, is using cookie values from a logged-in user supposed to work when you build from the head of master? Nitter still won't run without the guest tokens, and I get segfaults when I try to use other branches and leave them out

Did you put the cookie information in the nitter.conf file only? As stated here, you need to generate the necessary info for the guest_accounts.jsonl file.

As I understand the current codebase, guest_accounts.json is for short-term credentials from when you create anonymous guest accounts instead of a "real" account (hence the name); if I understand this comment correctly, I shouldn't need a guest_accounts.json file if I enter the cookie info into nitter.conf.

When I created a guest_accounts.json file I didn't need to enter cookie info, but I encountered a different bug where nitter crashed if I didn't use the service for half an hour or so, but bouncing the service fixed it.

As I understand the current codebase, guest_accounts.json is for short-term credentials from when you create anonymous guest accounts instead of a "real" account

Guest accounts are not supported anymore, twitter took the API that generated those tokens down.

if I understand zedeus#830 (comment) correctly, I shouldn't need a guest_accounts.json file if I enter the cookie info into nitter.conf.

That PR is a little old now. It has no mentions of guest accounts.

When I created a guest_accounts.json file I didn't need to enter cookie info, but I encountered a different bug where nitter crashed if I didn't use the service for half an hour or so, but bouncing the service fixed it.

What branch are you using? I've setup mine from PrivacyDev's master branch, with both the cookie header info AND guest_accounts.jsonl file with 4 real accounts and I've had no issues whatsoever.

Guest accounts are not supported anymore, twitter took the API that generated those tokens down

I know that, which is why my Nitter instance refusing to run unless I have a guest_accounts.json file is confusing

That PR is a little old now. It has no mentions of guest accounts

The code from that PR is merged into the master branch, so I would expect it to still function correctly

I am using commit cb0d360 from the master branch; the issue is including the cookie info in my config file seems to do nothing (I can remove it and access everything I can with just the guest_accounts.json file), the issue with the service failing after 30 minutes of inactivity is separate

I know that, which is why my Nitter instance refusing to run unless I have a guest_accounts.json file is confusing

The file name is irrelevant, what matters is its function. Without it, nitter will not be able to do anything, so that's why it doesn't start.
image

Just add a real account to the guest_accounts.jsonl file using the instructions here #45 (comment). The cookie header is just so you can see NSFW content and likes too.

image

Thanks @PrivacyDevel ! Worked like a charm! But I was not able to make the Likes tab working. Any help in that case?

#42 has a PR linked to it to add a fix

Thanks @rotorot0 ! Followed that and it's working now!

How can I create a query to filter only tweets from search? I tried this but doesn't work

Query(kind: posts, fromUser: @[username], excludes: @["replies", "retweets", "nativeretweets", "quotes"])

Also, do I need to use proxy in case I am using multiple accounts?