all repos — gif-escarbot @ f4d197313fa0b0d01afc9264df8a87c5ab64fa51

Earthbound Café's custom delivery bot with other cool utilities built-in.

add support for x.com links
Marco Andronaco andronacomarco@gmail.com
Fri, 25 Aug 2023 12:52:05 +0200
commit

f4d197313fa0b0d01afc9264df8a87c5ab64fa51

parent

d23362e165c281d10b2ce7c488c3ab33ab313172

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M Replacer.pyReplacer.py

@@ -16,9 +16,13 @@ {

"regex": re.compile(r"(?:https?:\/\/)?(?:www\.)?twitter\.com\/(?:#!\/)?(.*)\/status(?:es)?\/([^\/\?\s]+)", re_flags), "becomes": "https://fxtwitter.com/{}/status/{}", }, + { + "regex": re.compile(r"(?:https?:\/\/)?(?:www\.)?x\.com\/(?:#!\/)?(.*)\/status(?:es)?\/([^\/\?\s]+)", re_flags), + "becomes": "https://fixupx.com/{}/status/{}", + }, ] -link_message = "Link di {}[\.]({})" +link_message = "Da {}[\.]({})" def get_callback_data(feedback: bool) -> str: payload = { "feedback": feedback }