download_fileobj

sunpy.util.net.download_fileobj(opn, directory, url='', default='file', overwrite=False)[source] [edit on github]

Download file from url into directory. Try to get filename from Content-Disposition header, otherwise get from path of url if given. Fall back to default if both fail. Only overwrite existing files when overwrite is True.