Skip to content

Commit

Permalink
🐛 3.6.5: Fixed Regular Expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
AirportR committed Dec 14, 2023
1 parent 24c304b commit 597b7db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] # 列表中第一个项为订阅地址
Expand Down

0 comments on commit 597b7db

Please sign in to comment.