Open with one click!
In [5]:
import urllib import os import urllib3 bedmap_path = '.' url = os.path.join( 'https://download.osgeo.org/geotiff/samples/usgs/c41078a1.tif') http = urllib3.PoolManager() r = http.request('GET', url, preload_content=False) with open(os.path.join(bedmap_path, 'bedmap2_tiff.tif'), 'wb') as out: while True: data = r.read() if not data: break out.write(data) r.release_conn()
In [6]:
! ls -l bedmap2_tiff.tif
-rw-r--r-- 1 user user 15777806 Jun 23 08:13 bedmap2_tiff.tif
In [7]:
! sha256sum bedmap2_tiff.tif
a4b75a080744ffcb207655407ca08a4a7820f9eb061f84cb00bb735fd2b2f83a bedmap2_tiff.tif
In [ ]: