Merge pull request #280 from cokeBeer/master

fix csv encoding problem
This commit is contained in:
Jing Ling
2022-10-08 12:47:59 +08:00
committed by GitHub
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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)
+2
View File
@@ -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()