def download(self):
"""
Downloads the latest iOS gadget.
:return:
"""
download_url = self._get_download_url()
# stream the download using requests
dylib = requests.get(download_url, stream=True)
# save the requests stream to file
with open(self.ios_dylib_gadget_archive_path, 'wb') as f:
click.secho('Downloading iOS dylib to {0}...'.format(self.ios_dylib_gadget_archive_path),
fg='green', dim=True)
shutil.copyfileobj(dylib.raw, f)
return self
评论列表
文章目录