mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
fix csv encoding problem
This commit is contained in:
@@ -330,6 +330,8 @@ def export_all_results(path, name, fmt, datas):
|
||||
row_list.append(Record(keys, values))
|
||||
rows = RecordCollection(iter(row_list))
|
||||
content = rows.export(fmt)
|
||||
if fmt == 'csv':
|
||||
content = '\ufeff' + content
|
||||
save_to_file(path, content)
|
||||
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ def do_export(fmt, path, rows, show, domain, target):
|
||||
if show:
|
||||
print(rows.dataset)
|
||||
data = rows.export(fmt)
|
||||
if fmt == 'csv':
|
||||
data = '\ufeff' + data
|
||||
utils.save_to_file(path, data)
|
||||
logger.log('ALERT', f'The subdomain result for {domain}: {path}')
|
||||
data = rows.as_dict()
|
||||
|
||||
Reference in New Issue
Block a user