def fetch_toca(): now = datetime.datetime.utcnow() # an image appears 8 minutes over the 10 minute interval # so this will map to the right 10 minute interval most of the time now = now - datetime.timedelta(seconds=60 * 8) now = now.replace(minute=now.minute - now.minute % 10) url = URL_VREME_TOCA % now.strftime("%Y%m%d-%H%M") return fetch(url)
def fetch_toca(): now = datetime.datetime.utcnow() # an image appears 8 minutes over the 10 minute interval # so this will map to the right 10 minute interval most of the time now = now - datetime.timedelta(seconds=60 * 8) now = now.replace(minute=now.minute - now.minute % 10) url = URL_VREME_TOCA % now.strftime('%Y%m%d-%H%M') return fetch(url)
def fetch_aladin(ft, n): assert n % 3 == 0 return fetch(URL_VREME_ALADIN % (ft.strftime("%Y%m%d"), ft.strftime("%H%M"), n))
def fetch_radar(): return fetch(URL_VREME_RADAR)
def fetch_aladin(ft, n): assert n % 3 == 0 return fetch(URL_VREME_ALADIN % (ft.strftime('%Y%m%d'), ft.strftime('%H%M'), n))