mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
修复传入包含批量主域的文件路径无效的问题
This commit is contained in:
+12
-12
@@ -124,19 +124,19 @@ def get_domains(target):
|
|||||||
elif isinstance(target, list):
|
elif isinstance(target, list):
|
||||||
domains = target
|
domains = target
|
||||||
elif isinstance(target, str):
|
elif isinstance(target, str):
|
||||||
target = target.lower().strip()
|
path = Path(target)
|
||||||
domain = Domain(target).match()
|
if path.exists() and path.is_file():
|
||||||
if domain:
|
with open(target, encoding='utf-8', errors='ignore') as file:
|
||||||
domains.append(domain)
|
for line in file:
|
||||||
|
line = line.lower().strip()
|
||||||
|
domain = Domain(line).match()
|
||||||
|
if domain:
|
||||||
|
domains.append(domain)
|
||||||
else:
|
else:
|
||||||
path = Path(target)
|
target = target.lower().strip()
|
||||||
if path.is_file() and path.exists():
|
domain = Domain(target).match()
|
||||||
with open(target, encoding='utf-8', errors='ignore') as file:
|
if domain:
|
||||||
for line in file:
|
domains.append(domain)
|
||||||
line = line.lower().strip()
|
|
||||||
domain = Domain(line).match()
|
|
||||||
if domain:
|
|
||||||
domains.append(domain)
|
|
||||||
count = len(domains)
|
count = len(domains)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
logger.log('FATAL', f'获取到{count}个域名')
|
logger.log('FATAL', f'获取到{count}个域名')
|
||||||
|
|||||||
Reference in New Issue
Block a user