Created
August 20, 2020 11:33
-
-
Save dstansby/7558b6108aee99a4581efba8cc0bc28a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from parfive import Downloader | |
for i in range(10, 20): | |
dl = Downloader() | |
dl.enqueue_file(f"https://spdf.gsfc.nasa.gov/pub/data/psp/fields/l2/mag_rtn_1min/2018/psp_fld_l2_mag_rtn_1min_201811{i:02}_v01.cdf", path="./") | |
result = dl.download() | |
if len(result.errors): | |
raise result.errors[0][2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment