Skip to main content
deleted 6 characters in body
Source Link
yukashima huksay
  • 6.1k
  • 8
  • 49
  • 82

For a python3 (tested on 3.5) approach I'd recommend:

    with urlopen(file_url) as in_file, open(local_file_address, 'wb') as out_file:
        print(in_file.getheader('Content-Length'))
        out_file.write(response.read())

For a python3 (tested on 3.5) approach I'd recommend:

    with urlopen(file_url) as in_file, open(local_file_address, 'wb') as out_file:
        print(in_file.getheader('Content-Length'))
        out_file.write(response.read())

For a python3 (tested on 3.5) approach I'd recommend:

with urlopen(file_url) as in_file, open(local_file_address, 'wb') as out_file:
    print(in_file.getheader('Content-Length'))
    out_file.write(response.read())
Source Link
yukashima huksay
  • 6.1k
  • 8
  • 49
  • 82

For a python3 (tested on 3.5) approach I'd recommend:

    with urlopen(file_url) as in_file, open(local_file_address, 'wb') as out_file:
        print(in_file.getheader('Content-Length'))
        out_file.write(response.read())