import requests
url = 'http://client.akamai.com/install/test-objects/10MB.bin'
resp = requests.get(url)
print(resp.headers['content-length'])
Get file size from "Content-Length" value from a file in python 3.2