all repos — gif-escarbot @ 4e8118e3afad72143e6ade376a9d432d221aac2c

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

fix regex
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 23:51:08 +0200
commit

4e8118e3afad72143e6ade376a9d432d221aac2c

parent

ba3f25225482fd01f8b05304c59c92fc6748585a

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

jump to
M escarbot/replace.pyescarbot/replace.py

@@ -52,8 +52,8 @@ "regex": re.compile(r"(?:https?:\/\/)?(?:www\.)?instagram\.com\/((?:reel)|p)\/([A-Za-z0-9_]{11})[\/\?\w=&]*", re_flags),

"becomes": "https://ddinstagram.com/{}/{}", }, { - "regex": re.compile(r"(?:https?:\/\/)?(?:(?:www)|(?:vm))?\.?tiktok\.com\/(@[\w]+)\/?(?:video)?\/?(\d+)?", re_flags), - "becomes": "https://tnktok.com/{}/{}", + "regex": re.compile(r"(?:https?:\/\/)?(?:(?:www)|(?:vm))?\.?tiktok\.com\/@([\w\d_.]+)\/(?:video)\/(\d+)", re_flags), + "becomes": "https://www.tnktok.com/@{}/video/{}", }, { "regex": re.compile(r"(?:https?:\/\/)?(?:(?:www)|(?:vm))?\.?tiktok\.com\/([\w]+)\/?", re_flags),