Skip to content

Instantly share code, notes, and snippets.

@ledovsky
Created January 14, 2014 19:00
Show Gist options
  • Save ledovsky/8423758 to your computer and use it in GitHub Desktop.
Save ledovsky/8423758 to your computer and use it in GitHub Desktop.
downloading image
def download_image(url, filename):
img = urllib.urlopen(url).read()
if img:
f = open('images/%s.jpg' % filename, 'wb')
f.write(urllib.urlopen(url).read())
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment