diff --git a/coordinator/ProcessorScraper.py b/coordinator/ProcessorScraper.py index 1a36b3a7fbaeb579b3c04c1b8b48639a367593ea..cee27963b2fc62b71aeb6cb671547ac4493921a2 100644 --- a/coordinator/ProcessorScraper.py +++ b/coordinator/ProcessorScraper.py @@ -50,12 +50,10 @@ def get_news_reports_from_url(job_dir: str, url = URL_DEFAULT) -> None: assert os.path.exists(job_dir) - r = requests.get(url) - - # write a local copy of the zip file + # Get the zip file from the url and immediately write a local copy fn_zip = f"{job_dir}/data.zip" with open(fn_zip,'wb') as zipfile: - zipfile.write(r.content) + zipfile.write(requests.get(url).content) # unzip it dir_unzip = f"{job_dir}/data/"