mirror of
https://github.com/unmojang/meta.git
synced 2025-09-28 13:45:42 -04:00
7 lines
210 B
Python
7 lines
210 B
Python
def download_binary_file(sess, path, url):
|
|
with open(path, "wb") as f:
|
|
r = sess.get(url)
|
|
r.raise_for_status()
|
|
for chunk in r.iter_content(chunk_size=128):
|
|
f.write(chunk)
|