示例#1
0
文件: models.py 项目: zejn/arsoapi
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)
示例#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)
示例#3
0
文件: models.py 项目: zejn/arsoapi
def fetch_aladin(ft, n):

    assert n % 3 == 0
    return fetch(URL_VREME_ALADIN % (ft.strftime("%Y%m%d"), ft.strftime("%H%M"), n))
示例#4
0
文件: models.py 项目: zejn/arsoapi
def fetch_radar():
    return fetch(URL_VREME_RADAR)
示例#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))
示例#6
0
def fetch_radar():
    return fetch(URL_VREME_RADAR)