Skip to content

Commit

Permalink
Download in 8 MB chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
audiodude committed Aug 31, 2024
1 parent a844c52 commit c44be71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp1/scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit c44be71

Please sign in to comment.