fix regex
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 23:51:08 +0200
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
escarbot/replace.py
→
escarbot/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),