diff --git a/models/material.py b/models/material.py index bd8a884..07d1e02 100644 --- a/models/material.py +++ b/models/material.py @@ -20,7 +20,7 @@ class YattaMaterial(BaseModel): """名称""" description: str """描述""" - story: str + story: Optional[str] = None """故事""" rank: int """稀有度""" diff --git a/res_func/avatar.py b/res_func/avatar.py index f26ecef..300f43d 100644 --- a/res_func/avatar.py +++ b/res_func/avatar.py @@ -47,7 +47,7 @@ async def parse_station(datas, name: str, tag: Tag, cid: int): return f'{style[style.find("(") + 1:style.find(")")]}' third_pic = get_third_pic() - text = soup.find("div", {"class": "a6678 a4af5"}).get("style") + text = soup.find_all("div", {"class": "a4af5"})[1].get("style") four_pic = f'{text[text.find("(") + 2:text.find(")") - 1]}' if text else "" first_pic = f'{soup.find("img", {"class": "ac39b a6602"}).get("src")}' datas.append(