Skip to content

Instantly share code, notes, and snippets.

@nipunsadvilkar
Last active April 5, 2017 11:00
Show Gist options
  • Save nipunsadvilkar/cea02e07d8a68f7c66439f86e3b8391e to your computer and use it in GitHub Desktop.
Save nipunsadvilkar/cea02e07d8a68f7c66439f86e3b8391e to your computer and use it in GitHub Desktop.
# __author__: kapoorabhish, nipunsadvilkar
import requests
user_name = "uname"
password = "*******"
file_url = "url"
r = requests.post(file_url, data={"umlsuser": user_name, "umlspw": password},
stream=True)
with open("/tmp/biomedicus-umls-data-1.5.0.zip", "w") as f:
for chunk in r.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment