Вот код:
from datetime import datetime import os today = datetime.now() if today.hour < 12: h = "00" else: h = "12" folder=os.mkdir('D:/Foto/AllSky/' + today.strftime('%Y%m%d')) import time import uuid import wget a=0 while True: def countdown(t): while t: mins,secs=divmod(t,60) timer='{:02d}:{:02d}'.format(mins, secs) print(timer, end='\r') time.sleep(1) t=t-1 URL='http://jupiter.to.ee/~tonis/pilt/AllSkyCurrentImage.JPG' img=folder wget.download(URL,img+str(uuid.uuid4())+'.jpg') t=2 countdown(int(t)) a=a+1 if a==2: break