import requests


def is_holiday(day):
    """
       判断是否节假日, api 来自百度 apistore: http://apistore.baidu.com/apiworks/servicedetail/1116.html
       :param day: 日期， 格式为 '20160404'
       :return: bool
       """
    api = "http://tool.bitefu.net/jiari/"
    params = {"d": day, "apiserviceid": 1116}
    rep = requests.get(api, params)
    res = rep.text
    return True if res != "0" else False