mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
解决解析报错问题
This commit is contained in:
+5
-1
@@ -116,7 +116,11 @@ def filter_name(path, black_name):
|
|||||||
|
|
||||||
|
|
||||||
def filter_url(domain, url, black_name):
|
def filter_url(domain, url, black_name):
|
||||||
raw_url = parse.urlparse(url)
|
try:
|
||||||
|
raw_url = parse.urlparse(url)
|
||||||
|
except Exception as e: # 解析失败则跳过该URL
|
||||||
|
logger.log('DEBUG', url, e.args)
|
||||||
|
return True
|
||||||
scheme = raw_url.scheme.lower()
|
scheme = raw_url.scheme.lower()
|
||||||
if not scheme:
|
if not scheme:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user