Exemplo 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)
Exemplo 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)
Exemplo 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))
Exemplo n.º 4
0
def fetch_radar():
    return fetch(URL_VREME_RADAR)
Exemplo 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))
Exemplo n.º 6
0
def fetch_radar():
    return fetch(URL_VREME_RADAR)