all repos — gif-escarbot @ 8074dc1990e8167cd5af16305e4c61b28f1ed24a

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

add tiktok
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 23:16:29 +0200
commit

8074dc1990e8167cd5af16305e4c61b28f1ed24a

parent

527ce6fa9a2f40fdbbe3942582a8ef47f9bb7781

3 files changed, 11 insertions(+), 4 deletions(-)

jump to
M .vscode/launch.json.vscode/launch.json

@@ -8,9 +8,8 @@ {

"name": "Python: Bot", "type": "python", "request": "launch", - "program": "main.py", - "console": "integratedTerminal", + "module": "escarbot", "justMyCode": true - } + }, ] }
M escarbot/replace.pyescarbot/replace.py

@@ -51,6 +51,14 @@ {

"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), + "becomes": "https://tnktok.com/{}/{}", + }, + { + "regex": re.compile(r"(?:https?:\/\/)?(?:(?:www)|(?:vm))?\.?tiktok\.com\/([\w]+)\/?", re_flags), + "becomes": "https://vm.tnktok.com/{}/", + }, ] link_message = "Da {}[\.]({}) {}"
M poetry.lockpoetry.lock

@@ -1,4 +1,4 @@

-# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "anyio"