mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
tqdm配置
This commit is contained in:
@@ -102,7 +102,11 @@ async def bulk_query_a(datas):
|
||||
tasks.append(task)
|
||||
if tasks: # 任务列表里有任务不空时才进行解析
|
||||
futures = asyncio.as_completed(tasks)
|
||||
for future in tqdm.tqdm(futures, total=len(tasks)):
|
||||
for future in tqdm.tqdm(futures,
|
||||
total=len(tasks),
|
||||
desc='Progress',
|
||||
smoothing=1.0,
|
||||
ncols=True):
|
||||
try:
|
||||
await future
|
||||
except:
|
||||
|
||||
@@ -110,7 +110,7 @@ def get_domains(target):
|
||||
:return: 域名集合
|
||||
"""
|
||||
domains = list()
|
||||
logger.log('INFOR', f'正在获取域名')
|
||||
logger.log('DEBUG', f'正在获取域名')
|
||||
if isinstance(target, (set, tuple)):
|
||||
domains = list(target)
|
||||
elif isinstance(target, list):
|
||||
@@ -184,11 +184,11 @@ def save_data(fpath, data):
|
||||
try:
|
||||
with open(fpath, 'w', encoding="utf-8", newline='') as file:
|
||||
file.write(data)
|
||||
logger.log('INFOR', fpath)
|
||||
logger.log('ALERT', fpath)
|
||||
except TypeError:
|
||||
with open(fpath, 'wb') as file:
|
||||
file.write(data)
|
||||
logger.log('INFOR', fpath)
|
||||
logger.log('ALERT', fpath)
|
||||
except Exception as e:
|
||||
logger.log('ERROR', e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user