Skip to content

Instantly share code, notes, and snippets.

@dstansby
Created August 20, 2020 11:33
Show Gist options
  • Save dstansby/7558b6108aee99a4581efba8cc0bc28a to your computer and use it in GitHub Desktop.
Save dstansby/7558b6108aee99a4581efba8cc0bc28a to your computer and use it in GitHub Desktop.
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