add support for x.com links
Marco Andronaco andronacomarco@gmail.com
Fri, 25 Aug 2023 12:52:05 +0200
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
Replacer.py
→
Replacer.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 }