diff --git a/cqwu/methods/webvpn/get_calendar.py b/cqwu/methods/webvpn/get_calendar.py index 12c9dc0..b5901e3 100644 --- a/cqwu/methods/webvpn/get_calendar.py +++ b/cqwu/methods/webvpn/get_calendar.py @@ -58,7 +58,7 @@ def parse_courses(jw_html: str) -> List[AiCourse]: soup = BeautifulSoup(jw_html, "lxml") trs = [i for i in soup.find_all("tr") if i.find("td", {"class": "td"})][:9] for tr in trs: - tds = tr.find_all("td")[2:] + tds = tr.find_all("td", {"class": "td"}) for index, td in enumerate(tds): divs = td.find_all("div") for div in divs: diff --git a/cqwu/types/calendar.py b/cqwu/types/calendar.py index d517818..669fa3e 100644 --- a/cqwu/types/calendar.py +++ b/cqwu/types/calendar.py @@ -14,7 +14,7 @@ class AiCourse(BaseModel): @property def key(self): - return f"{','.join([str(i) for i in self.weeks])}_{self.day}_{self.sections}" + return f"{','.join([str(i) for i in self.weeks])}_{self.day}_{self.start_num}" @property def second_key(self): diff --git a/setup.py b/setup.py index 8cbeb39..ad84acd 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setuptools.setup( name="cqwu", # 用自己的名替换其中的YOUR_USERNAME_ - version="0.0.6", # 包版本号,便于维护版本 + version="0.0.7", # 包版本号,便于维护版本 author="omg-xtao", # 作者,可以写自己的姓名 author_email="xtao@xtaolink.cn", # 作者联系方式,可写自己的邮箱地址 description="A cqwu ehall client.", # 包的简述