From d87289ec7cddac16bddc61914cd5d377035cdd3c Mon Sep 17 00:00:00 2001 From: trivernis Date: Mon, 24 Feb 2020 19:08:03 +0100 Subject: [PATCH] Randomize the order of the requests --- miner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/miner.py b/miner.py index de8bdde..3af41b8 100755 --- a/miner.py +++ b/miner.py @@ -45,6 +45,7 @@ def request_loop(client: Client, urls: [str], fm: FileManager, method: str = 'GE f.write('datetime,status-code,timing,content-length\n') while True: try: + random.shuffle(urls) for url in urls: d = names[url] status_file = open(os.path.join(fm.data_dir, '%s-status.csv' % d), 'a')