From 597b7db6c30d1576c1bcbfea75e62d0cd9fddb3e Mon Sep 17 00:00:00 2001 From: AirportR Date: Thu, 14 Dec 2023 23:12:02 +0800 Subject: [PATCH] :bug: 3.6.5: Fixed Regular Expressions. --- utils/cleaner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/cleaner.py b/utils/cleaner.py index f31f8dea..64ca8659 100644 --- a/utils/cleaner.py +++ b/utils/cleaner.py @@ -1607,8 +1607,7 @@ def geturl(string: str, protocol_match: bool = False): :param: protocol_match: 是否匹配协议URI,并拼接成ubconverter形式 """ text = string - pattern = re.compile( - r"https?://(?:[a-zA-Z]|\d|[$-_@.&+]|[!*,]|[\w\u4e00-\u9fa5])+") # 匹配订阅地址 + pattern = re.compile("https?://(?:[a-zA-Z]|\d|[$-_@.&+]|[!*,]|[\w\u4e00-\u9fa5])+") # 匹配订阅地址 # 获取订阅地址 try: url = pattern.findall(text)[0] # 列表中第一个项为订阅地址