robertoszek / pleroma-bot

Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon/Misskey.
https://robertoszek.github.io/pleroma-bot
MIT License
104 stars 18 forks source link

HTTP 422 error for certain quote tweets #129

Open nemobis opened 1 year ago

nemobis commented 1 year ago

The tweet https://nitter.net/EESC_PRESS/status/1650455054833287170#m produces an error 422 with the latest stable version and also with the latest rc version:

Gathering tweets... 38
ℹ 2023-05-08 23:48:33,775 - pleroma_bot - INFO - tweets gathered:        38  
Processing tweets... : 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38/38 [00:15<00:00,  2.40it/s]
ℹ 2023-05-08 23:48:49,741 - pleroma_bot - INFO - tweets to post:         38             
Posting tweets... :   0%|                                                                                                                                                                                            | 0/38 [00:00<?, ?it/s]
✖ 2023-05-08 23:48:51,780 - pleroma_bot - ERROR - Exception occurred for user, skipping... (cli.py:721) 
Traceback (most recent call last):                                                                                    
  File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/pleroma_bot/cli.py", line 688, in main
    post_id = user.post(                                                                                              
  File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/pleroma_bot/_utils.py", line 796, in post
    post_id = self.post_pleroma(tweet, poll, sensitive, media, cw=cw)
  File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/pleroma_bot/_pleroma.py", line 398, in post_pleroma
    response.raise_for_status()                                                                                       
  File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)                                                                    
requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://respublicae.eu/api/v1/statuses

Screenshot_20230508_235746

dawnerd commented 1 year ago

Also started getting this too, maybe twitter made a change?

logs: https://gist.github.com/dawnerd/74c234ee3b1b386bdfc45322485f24c6

nemobis commented 1 year ago

Also happens for quote tweets which quote longer tweets from Twitter Blue subscribers, like https://nitter.lacontrevoie.fr/SophieintVeld/status/1661855362100654082#m (over 900 characters).