Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.request as urllib
- import time
- from time import gmtime, strftime
- image = urllib.URLopener()
- while True:
- timestr = strftime("%H-%M-%S", gmtime())
- filename = "cc_" + timestr + ".jpg"
- try:
- image.retrieve("http://www.giglionews.com/isoladelgiglio_porto.jpg", "images/" + filename)
- print("Saved new image at " + filename)
- except:
- print("Error at " + timestr)
- time.sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment