[GH-ISSUE #129] Bot Disabled / Old Tweets Spamming Webhook #36

Closed
opened 2026-09-02 13:09:01 +02:00 by TheLovinator · 5 comments
Owner

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

When this app receives a bad gateway response from the configured Nitter instance, it seems to consider all Tweets, regardless of age, as new and sends them to the Feed Webhook. Note there is a lot of log spam and I'm not 100% confident in the cause.

2023-07-21 at 18:07:00 INFO  Skipping entry Entry(id='https://nitter.lovinator.space/SHGames/status/1453410867656146944#m', updated=None, title="RT by @AdamIscove: It's been an honor to work with legendary composer @BearMcCreary on the score for #Vanguard\n\nHere's a look behind the scenes of how it all came together 👀", link='https://nitter.lovinator.space/SHGames/status/1453410867656146944#m', author='@SHGames', published=datetime.datetime(2021, 10, 27, 17, 18, 48, tzinfo=datetime.timezone.utc), summary='<p>It\'s been an honor to work with legendary composer <a href="https://nitter.lovinator.space/bearmccreary" title="Bear McCreary 🐻🎶">@BearMcCreary</a> on the score for <a href="https://nitter.lovinator.space/search?q=%23Vanguard">#Vanguard</a><br />\n<br />\nHere\'s a look behind the scenes of how it all came together 👀</p>\n<img src="https://nitter.lovinator.space/pic/media%2FFCuM7LEWEAAjcjQ.jpg" />', content=(), enclosures=(), read=False, read_modified=None, important=None, important_modified=None, added=datetime.datetime(2023, 7, 21, 17, 45, 29, 579605, tzinfo=datetime.timezone.utc), added_by='feed', last_updated=datetime.datetime(2023, 7, 21, 17, 45, 29, 579605, tzinfo=datetime.timezone.utc), original_feed_url='https://nitter.lovinator.space/AdamIscove/rss', feed=Feed(url='https://nitter.lovinator.space/AdamIscove/rss', updated=None, title='Adam Iscove / @AdamIscove', link='https://nitter.lovinator.space/AdamIscove', author=None, subtitle='Twitter feed for: @AdamIscove. Generated by nitter.lovinator.space', version='rss20', user_title=None, added=datetime.datetime(2023, 7, 21, 4, 0, 25, 836343, tzinfo=datetime.timezone.utc), last_updated=datetime.datetime(2023, 7, 21, 17, 45, 29, 579605, tzinfo=datetime.timezone.utc), last_exception=ExceptionInfo(type_name='requests.exceptions.HTTPError', value_str='502 Server Error: Bad Gateway for url: https://nitter.lovinator.space/AdamIscove/rss', traceback_str='Traceback (most recent call last):\n  File "/home/botuser/.local/lib/python3.11/site-packages/reader/_retrievers.py", line 176, in _caching_get\n    response.raise_for_status()\n  File "/home/botuser/.local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status\n    raise HTTPError(http_error_msg, response=self)\nrequests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://nitter.lovinator.space/AdamIscove/rss\n'), updates_enabled=True)) as it is a retweet

image

Originally created by @EthanC on GitHub (Jul 21, 2023). Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/129 When this app receives a bad gateway response from the configured Nitter instance, it seems to consider all Tweets, regardless of age, as new and sends them to the Feed Webhook. Note there is a lot of log spam and I'm not 100% confident in the cause. ``` 2023-07-21 at 18:07:00 INFO Skipping entry Entry(id='https://nitter.lovinator.space/SHGames/status/1453410867656146944#m', updated=None, title="RT by @AdamIscove: It's been an honor to work with legendary composer @BearMcCreary on the score for #Vanguard\n\nHere's a look behind the scenes of how it all came together 👀", link='https://nitter.lovinator.space/SHGames/status/1453410867656146944#m', author='@SHGames', published=datetime.datetime(2021, 10, 27, 17, 18, 48, tzinfo=datetime.timezone.utc), summary='<p>It\'s been an honor to work with legendary composer <a href="https://nitter.lovinator.space/bearmccreary" title="Bear McCreary 🐻🎶">@BearMcCreary</a> on the score for <a href="https://nitter.lovinator.space/search?q=%23Vanguard">#Vanguard</a><br />\n<br />\nHere\'s a look behind the scenes of how it all came together 👀</p>\n<img src="https://nitter.lovinator.space/pic/media%2FFCuM7LEWEAAjcjQ.jpg" />', content=(), enclosures=(), read=False, read_modified=None, important=None, important_modified=None, added=datetime.datetime(2023, 7, 21, 17, 45, 29, 579605, tzinfo=datetime.timezone.utc), added_by='feed', last_updated=datetime.datetime(2023, 7, 21, 17, 45, 29, 579605, tzinfo=datetime.timezone.utc), original_feed_url='https://nitter.lovinator.space/AdamIscove/rss', feed=Feed(url='https://nitter.lovinator.space/AdamIscove/rss', updated=None, title='Adam Iscove / @AdamIscove', link='https://nitter.lovinator.space/AdamIscove', author=None, subtitle='Twitter feed for: @AdamIscove. Generated by nitter.lovinator.space', version='rss20', user_title=None, added=datetime.datetime(2023, 7, 21, 4, 0, 25, 836343, tzinfo=datetime.timezone.utc), last_updated=datetime.datetime(2023, 7, 21, 17, 45, 29, 579605, tzinfo=datetime.timezone.utc), last_exception=ExceptionInfo(type_name='requests.exceptions.HTTPError', value_str='502 Server Error: Bad Gateway for url: https://nitter.lovinator.space/AdamIscove/rss', traceback_str='Traceback (most recent call last):\n File "/home/botuser/.local/lib/python3.11/site-packages/reader/_retrievers.py", line 176, in _caching_get\n response.raise_for_status()\n File "/home/botuser/.local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status\n raise HTTPError(http_error_msg, response=self)\nrequests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://nitter.lovinator.space/AdamIscove/rss\n'), updates_enabled=True)) as it is a retweet ``` ![image](https://github.com/TheLovinator1/discord-twitter-webhooks/assets/16727756/8444e96b-b996-4421-b25b-e2380c7528e4)
Author
Owner

@EthanC commented on GitHub (Jul 21, 2023):

github.com/TheLovinator1/discord-twitter-webhooks@eab4e6f67e is related, I'm sure.

<!-- gh-comment-id:1646081062 --> @EthanC commented on GitHub (Jul 21, 2023): https://github.com/TheLovinator1/discord-twitter-webhooks/commit/eab4e6f67e7aa6c4f7f4ecaed60fb3049bdfd6d6 is related, I'm sure.
Author
Owner

@TheLovinator1 commented on GitHub (Jul 21, 2023):

Hi, sorry for that

It is because of github.com/zedeus/nitter@cc5841df30

That commit increased the amount of tweets (11 before, 19 now) in the RSS feed on Nitter, so my bot started posting tweets that was older than the last oldest tweet

I made a commit (github.com/TheLovinator1/discord-twitter-webhooks@eab4e6f67e) that disabled the bot to try to minimize the damage

<!-- gh-comment-id:1646086754 --> @TheLovinator1 commented on GitHub (Jul 21, 2023): Hi, sorry for that It is because of https://github.com/zedeus/nitter/commit/cc5841df308506356d329662d0f0c2ec4713a35c That commit increased the amount of tweets (11 before, 19 now) in the RSS feed on Nitter, so my bot started posting tweets that was older than the last oldest tweet I made a commit (https://github.com/TheLovinator1/discord-twitter-webhooks/commit/eab4e6f67e7aa6c4f7f4ecaed60fb3049bdfd6d6) that disabled the bot to try to minimize the damage
Author
Owner

@EthanC commented on GitHub (Jul 21, 2023):

Updated the title to better reflect the situation, I didn't put too much time into understanding what was happening haha. Thanks for minimizing the impact, looking forward to everything being back up and running!

<!-- gh-comment-id:1646108945 --> @EthanC commented on GitHub (Jul 21, 2023): Updated the title to better reflect the situation, I didn't put too much time into understanding what was happening haha. Thanks for minimizing the impact, looking forward to everything being back up and running!
Author
Owner

@TheLovinator1 commented on GitHub (Jul 21, 2023):

It should be fixed in github.com/TheLovinator1/discord-twitter-webhooks@a494d8457f, I am now checking if the unsent tweet is older than the oldest sent tweet, so this shouldn't happen again

Sorry again for the spam

<!-- gh-comment-id:1646135003 --> @TheLovinator1 commented on GitHub (Jul 21, 2023): It should be fixed in https://github.com/TheLovinator1/discord-twitter-webhooks/commit/a494d8457fe1b44497fcc7fde34a3b4a2db60c7e, I am now checking if the unsent tweet is older than the oldest sent tweet, so this shouldn't happen again Sorry again for the spam
Author
Owner

@EthanC commented on GitHub (Jul 22, 2023):

Confirmed resolved

<!-- gh-comment-id:1646557537 --> @EthanC commented on GitHub (Jul 22, 2023): Confirmed resolved
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#36
No description provided.