Created
March 3, 2016 07:15
-
-
Save drhanlau/e44e06f5edd83132c62f to your computer and use it in GitHub Desktop.
ImageDownloader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
class ImageDownloader(): | |
def download(self, filename): | |
urllib.urlretrieve(self.url, filename) | |
img = ImageDownloader() | |
img.url = "http://i.imgur.com/Ph4Xw.jpg" | |
img.download("duck.jpg") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment