from model.contants import Contants
from lib.utils import UtilsFunction
from bs4 import BeautifulSoup
class MatchModel:

    def getMatchListByDate(targetDate):
        matchList = []
        nowDate = UtilsFunction.getNowString(UtilsFunction.C_YYYY_MM_DD)
        if targetDate >= nowDate:
            url = Contants.BASE_SAICHENG_URL + targetDate.replace("-", "")
        else:
            url = Contants.BASE_WANCHANG_URL + targetDate.replace("-", "")
        html = UtilsFunction.getHtmlCode(url)
        soup = BeautifulSoup(html, 'lxml')
        matchList.append(targetDate)
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        matchList.append("dalian-ddd")
        matchList.append("guangzhou-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dalian-ddd")
        matchList.append("dsds-ddd")
        matchList.append("sss-ddd")
        matchList.append("aaa-ddd")
        return matchList