fix save
This commit is contained in:
parent
68231dce0a
commit
526eb7d5e4
@ -38,6 +38,7 @@ def main(args):
|
|||||||
with tqdm(total=max_len) as pbar:
|
with tqdm(total=max_len) as pbar:
|
||||||
if args.start_page_number:
|
if args.start_page_number:
|
||||||
pbar.update(data_number)
|
pbar.update(data_number)
|
||||||
|
pbar.refresh()
|
||||||
|
|
||||||
while data_number < max_len:
|
while data_number < max_len:
|
||||||
pbar.set_description(f"Page number: {page_number}")
|
pbar.set_description(f"Page number: {page_number}")
|
||||||
@ -64,6 +65,8 @@ def main(args):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
save_data(f"./{args.output_file_name}-{args.type}.tsv", result_list)
|
save_data(f"./{args.output_file_name}-{args.type}.tsv", result_list)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
save_data(f"./{args.output_file_name}-{args.type}.tsv", result_list)
|
||||||
|
|
||||||
save_data(f"./{args.output_file_name}-{args.type}.tsv", result_list)
|
save_data(f"./{args.output_file_name}-{args.type}.tsv", result_list)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user