Last active
May 21, 2017 02:40
-
-
Save evanhalley/3808528633ffa61bc509aa52cee55e79 to your computer and use it in GitHub Desktop.
Saves an image (jpg) given a url
This file contains 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 sys | |
import urllib | |
import time | |
url = sys.argv[1] | |
directory = sys.argv[2] | |
destination = directory + "/" + str(time.time()) + ".jpg" | |
print 'Saving image from url ', url, ' to ', destination | |
urllib.urlretrieve(url, destination) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment