all repos — gif-escarbot @ f8e2e98680716dabf1b2999c63a8cfd85c9d8de1

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

add instagram support
Marco Andronaco andronacomarco@gmail.com
Fri, 25 Aug 2023 21:57:11 +0200
commit

f8e2e98680716dabf1b2999c63a8cfd85c9d8de1

parent

bd90adc6575ce56127ebd261c9c61e58f6d8c629

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M Replacer.pyReplacer.py

@@ -20,6 +20,10 @@ {

"regex": re.compile(r"(?:https?:\/\/)?(?:www\.)?x\.com\/(?:#!\/)?(.*)\/status(?:es)?\/([^\/\?\s]+)", re_flags), "becomes": "https://fixupx.com/{}/status/{}", }, + { + "regex": re.compile(r"(?:https?:\/\/)?(?:www\.)?instagram\.com\/((?:reel)|p)\/([A-Za-z0-9_]{11})[\/\?\w=&]*", re_flags), + "becomes": "https://ddinstagram.com/{}/{}", + }, ] link_message = "Da {}[\.]({})"