This commit is contained in:
Michał Kozłowski 2023-01-07 11:42:54 +01:00
parent 68231dce0a
commit 526eb7d5e4

View File

@ -38,6 +38,7 @@ def main(args):
with tqdm(total=max_len) as pbar:
if args.start_page_number:
pbar.update(data_number)
pbar.refresh()
while data_number < max_len:
pbar.set_description(f"Page number: {page_number}")
@ -64,6 +65,8 @@ def main(args):
except Exception as e:
print(e)
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)