I am trying tensorflow in Google Colaboratory from this codelab, I need to download \'http://download.tensorflow.org/example_images/flower_photos.tgz\' this file to complete th
Read the manual, they have good examples and explanations: urllib.request
To download:
>>> import os
>>> import urllib.request
>>> urllib.request.urlretrieve('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png', 'google.png')
('google.png', )
>>> os.listdir()
['google.png']
To just check the content:
>>> with urllib.request.urlopen('http://www.python.org/') as f:
... print(f.read(300))