From 92e24b4cb4574b6bf4fa66c1a8b78a1447c71702 Mon Sep 17 00:00:00 2001 From: Travis Briggs Date: Mon, 19 Aug 2024 19:20:44 -0700 Subject: [PATCH] Download in 8 MB chunks --- wp1/scores.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp1/scores.py b/wp1/scores.py index 2d1da7cc..8688053f 100644 --- a/wp1/scores.py +++ b/wp1/scores.py @@ -88,8 +88,8 @@ def download_pageviews(): r.raise_for_status() try: with open(cur_filepath, 'wb') as f: - # Read data in 8 KB chunks - for chunk in r.iter_content(chunk_size=8 * 1024): + # Read data in 8 MB chunks + for chunk in r.iter_content(chunk_size=8 * 1024 * 1024): f.write(chunk) except Exception as e: logger.exception('Error downloading pageviews')