cquest / tootbot

python bot to clone tweets to a mastodon account
GNU Affero General Public License v3.0
101 stars 35 forks source link

Enhance error handling logic #27

Closed javerous closed 1 year ago

javerous commented 1 year ago

Related to https://github.com/cquest/tootbot/issues/26 and another issue I had where the server takes more than the 5 + 10 seconds to process the post media, I made these changes which work well for me.

I know that matching human localized string is fragile and not a good practice, but we don't have really the choice with Mastodon API apparently.

I'm not a Python developer, so there is chance it was possible to fix that differently, in a more Python-ish way.

Feel free to comment and/or if you are interested.

(P.-S. I also updated yt-dlp because it was failing frequently)

javerous commented 1 year ago

I should have created another branch to avoid including unrelated changes :/

I can create one if you are interested by the error handling.

Other commits include recompression of video too large and removal of YouTube videos because it's a mess when a tweet contains a link to a livestream video.