diff --git a/bot/msgprocessor.py b/bot/msgprocessor.py index ecf6b99..2bce944 100644 --- a/bot/msgprocessor.py +++ b/bot/msgprocessor.py @@ -33,8 +33,8 @@ class TrackerRemovalMsgProcessor: # но ссылка может быть и без указания схемы, телега может распарсить # просто строку через точки и в конце какой то домен верхнего уровня как ссылку def is_url(url: str) -> bool: - SCHEME = "http://" - return url.startswith(SCHEME) + SCHEMES = ["http://", "https://"] + return len([s for s in SCHEMES if url.startswith(s)]) != 0 lexems = self.__msg.text.split() for i, l in enumerate(lexems):