import requests


def is_holiday(day):
    """
    判断是否节假日
    参数：
    day: 日期， 格式为 '20160404'
    return: bool
    """
    api = 'http://www.easybots.cn/api/holiday.php'
    params = {'d': day}
    rep = requests.get(api, params)
    res = rep.json()[day if isinstance(day, str) else day[0]]
    return True if res == "1" else False