@IsaacB1/

file downloader

Python

No description

fork
loading
Files
  • main.py
  • crazy-craft-3-0.zip
  • readme.txt
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import requests

print('Beginning file download with requests')

url = 'http://storage.rogatkin.com/scalacube/packages/minecraft/crazy-craft-3-0.zip'
r = requests.get(url)

localFile = 'crazy-craft-3-0.zip'

with open('localFile, 'wb') as f:
    f.write(r.content)

# Retrieve HTTP meta-data
print(r.status_code)
print(r.headers['content-type'])
print(r.encoding)