[GH-ISSUE #160] Custom Nitter Instance Not Working #45

Open
opened 2026-09-02 13:09:03 +02:00 by TheLovinator · 7 comments
Owner

Originally created by @EthanC on GitHub (Aug 23, 2023).
Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/160

Nitter, and many of its instances (including nitter.lovinator.space) are currently down due to Twitter changes (https://github.com/zedeus/nitter/issues/983). There are a handful of instances currently using a rewrite branch that are working, but setting the Nitter Instance in this app doesn't appear to function. In the logs, I see the settings are applied, but the app doesn't seem to ever fetch Tweets from the new instance. Restarting the app after applying the setting does not resolve the issue.

2023-08-23 05:09:02.479 | INFO     | discord_twitter_webhooks.reader_settings:get_data_location:36 - Data will be stored in /home/botuser/.local/share/discord_twitter_webhooks
2023-08-23 05:09:02.479 | DEBUG    | discord_twitter_webhooks.reader_settings:get_reader:68 - Data directory is owned by botuser:botuser
INFO:     Started server process [1]
INFO:     Waiting for application startup.
2023-08-23 at 05:09:02 INFO  I will check for new tweets every 1 minutes
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     X:52346 - "GET / HTTP/1.1" 200 OK
INFO:     X:52346 - "GET /settings HTTP/1.1" 200 OK
2023-08-23 at 05:28:13 DEBUG Saved application settings: ApplicationSettings(nitter_instance='https://nitter.cz', deepl_auth_key='', piped_instance='https://piped.video', teddit_instance='https://teddit.net', delay=1)
INFO:     X:52389 - "POST /settings HTTP/1.1" 200 OK
Originally created by @EthanC on GitHub (Aug 23, 2023). Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/160 Nitter, and many of its instances (including [nitter.lovinator.space](https://nitter.lovinator.space/)) are currently down due to Twitter changes (https://github.com/zedeus/nitter/issues/983). There are a [handful of instances](https://status.d420.de/) currently using a rewrite branch that are working, but setting the Nitter Instance in this app doesn't appear to function. In the logs, I see the settings are applied, but the app doesn't seem to ever fetch Tweets from the new instance. Restarting the app after applying the setting does not resolve the issue. ``` 2023-08-23 05:09:02.479 | INFO | discord_twitter_webhooks.reader_settings:get_data_location:36 - Data will be stored in /home/botuser/.local/share/discord_twitter_webhooks 2023-08-23 05:09:02.479 | DEBUG | discord_twitter_webhooks.reader_settings:get_reader:68 - Data directory is owned by botuser:botuser INFO: Started server process [1] INFO: Waiting for application startup. 2023-08-23 at 05:09:02 INFO I will check for new tweets every 1 minutes INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: X:52346 - "GET / HTTP/1.1" 200 OK INFO: X:52346 - "GET /settings HTTP/1.1" 200 OK 2023-08-23 at 05:28:13 DEBUG Saved application settings: ApplicationSettings(nitter_instance='https://nitter.cz', deepl_auth_key='', piped_instance='https://piped.video', teddit_instance='https://teddit.net', delay=1) INFO: X:52389 - "POST /settings HTTP/1.1" 200 OK ```
Author
Owner

@EthanC commented on GitHub (Aug 23, 2023):

@TheLovinator1 any chance you have time to look into this? It'd be great to be able to workaround the current Nitter issues!

<!-- gh-comment-id:1689311067 --> @EthanC commented on GitHub (Aug 23, 2023): @TheLovinator1 any chance you have time to look into this? It'd be great to be able to workaround the current Nitter issues!
Author
Owner

@0xpr03 commented on GitHub (Aug 23, 2023):

Please do not use public instances for your bots and operate your own. We will probably have to rate limit you, or straight up block bots due to how brittle the current rate limit situation from twitter is. There is a high chance you are already blocked due to cloud providers being the biggest source of scrapers.

<!-- gh-comment-id:1689797264 --> @0xpr03 commented on GitHub (Aug 23, 2023): Please do not use public instances for your bots and operate your own. We will probably have to rate limit you, or straight up block bots due to how brittle the current rate limit situation from twitter is. There is a high chance you are already blocked due to cloud providers being the biggest source of scrapers.
Author
Owner

@EthanC commented on GitHub (Aug 24, 2023):

After changing the Nitter instance, I noticed many URLs to the old instance in the database. I assume there's some kind of comparison happening here after the instance change that causes this issue.

Knowing this, I found a less-than-ideal workaround.

  1. Delete discord_twitter_webhooks.db (this will reset everything to defaults)
  2. Set the Nitter instance in Settings
  3. Re-add all of your Feeds

Feeds will then function as expected, using the newly-set, non-default Nitter instance.

<!-- gh-comment-id:1691049606 --> @EthanC commented on GitHub (Aug 24, 2023): After changing the Nitter instance, I noticed many URLs to the old instance in the database. I assume there's some kind of comparison happening here after the instance change that causes this issue. Knowing this, I found a less-than-ideal workaround. 1. Delete `discord_twitter_webhooks.db` (this will reset everything to defaults) 2. Set the Nitter instance in Settings 3. Re-add all of your Feeds Feeds will then function as expected, using the newly-set, non-default Nitter instance.
Author
Owner

@dziban303 commented on GitHub (Aug 25, 2023):

I noticed this too, I thought it just saved the currently selected instance when creating a feed. Does it not use the new instance when you create a new feed? I can't remember if I tested it or not @EthanC

<!-- gh-comment-id:1693923317 --> @dziban303 commented on GitHub (Aug 25, 2023): I noticed this too, I thought it just saved the currently selected instance when creating a feed. Does it not use the new instance when you create a new feed? I can't remember if I tested it or not @EthanC
Author
Owner

@EthanC commented on GitHub (Aug 25, 2023):

Hm, I didn't test creating a new feed without first deleting the db. But I can confirm that deleting the db, setting the new instance, and then creating a new feed will in fact use the new instance.

<!-- gh-comment-id:1693932795 --> @EthanC commented on GitHub (Aug 25, 2023): Hm, I didn't test creating a new feed without first deleting the db. But I can confirm that deleting the db, setting the new instance, and then creating a new feed will in fact use the new instance.
Author
Owner

@dziban303 commented on GitHub (Aug 25, 2023):

Ah it's just a SQL database, might be able to just change the instance for the feeds with sed or something

<!-- gh-comment-id:1693934836 --> @dziban303 commented on GitHub (Aug 25, 2023): Ah it's just a SQL database, might be able to just change the instance for the feeds with sed or something
Author
Owner

@dziban303 commented on GitHub (Aug 25, 2023):

OK, yes, creating a new feed after changing the default instance will apparently use the new instance. @TheLovinator1 given the present circumstances I think it'd be better if the currently selected default Nitter instance was used for all feeds instead of whatever instance was in use when the feed was originally created, and/or, allow changing the instance used for individual feeds.

Ethan I think we've annoyed him too much, lol.

<!-- gh-comment-id:1693942035 --> @dziban303 commented on GitHub (Aug 25, 2023): OK, yes, creating a new feed after changing the default instance will apparently use the new instance. @TheLovinator1 given the present circumstances I think it'd be better if the currently selected default Nitter instance was used for all feeds instead of whatever instance was in use when the feed was originally created, and/or, allow changing the instance used for individual feeds. Ethan I think we've annoyed him too much, lol.
Sign in to join this conversation.
No labels
pull-request
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
TheLovinator/discord-twitter-webhooks#45
No description provided.