all repos — gif-escarbot @ ba3f25225482fd01f8b05304c59c92fc6748585a

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

bugfixes
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 23:20:19 +0200
commit

ba3f25225482fd01f8b05304c59c92fc6748585a

parent

8074dc1990e8167cd5af16305e4c61b28f1ed24a

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

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

@@ -52,7 +52,7 @@ "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+)?[\S]", re_flags), + "regex": re.compile(r"(?:https?:\/\/)?(?:(?:www)|(?:vm))?\.?tiktok\.com\/(@[\w]+)\/?(?:video)?\/?(\d+)?", re_flags), "becomes": "https://tnktok.com/{}/{}", }, {

@@ -98,7 +98,7 @@

try: timestamp = site["timestamp"](r[-1]) except KeyError: - timestamp = None + timestamp = "" output.append([link, timestamp]) return output