We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69927ea commit 1ab08f5Copy full SHA for 1ab08f5
httpgraph-loader.py
@@ -14,12 +14,16 @@
14
import itertools
15
from urllib import request
16
from tqdm import tqdm
17
+from argparse import ArgumentParser
18
19
batch_size = 500
-file = "httpgraph-requests.json"
20
url = "http://localhost:65444/add_record"
21
22
-with open(file, "r", encoding="utf-8") as f:
+parser = ArgumentParser()
23
+parser.add_argument("filename", nargs="?", default="httpgraph-requests.json")
24
+args = parser.parse_args()
25
+
26
+with open(args.filename, "r", encoding="utf-8") as f:
27
pbar = tqdm(total=len(f.readlines()), unit=" URLs")
28
f.seek(0)
29
0 commit comments