Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def fetch_aladin(ft, n):

    assert n % 3 == 0
    return fetch(URL_VREME_ALADIN % (ft.strftime("%Y%m%d"), ft.strftime("%H%M"), n))
Esempio n. 4
0
def fetch_radar():
    return fetch(URL_VREME_RADAR)
Esempio n. 5
0
def fetch_aladin(ft, n):

    assert n % 3 == 0
    return fetch(URL_VREME_ALADIN %
                 (ft.strftime('%Y%m%d'), ft.strftime('%H%M'), n))
Esempio n. 6
0
def fetch_radar():
    return fetch(URL_VREME_RADAR)