fix: station avatar image

This commit is contained in:
xtaodada 2024-03-27 10:39:00 +08:00
parent b37691c956
commit 66cbb25555
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class YattaMaterial(BaseModel):
"""名称"""
description: str
"""描述"""
story: str
story: Optional[str] = None
"""故事"""
rank: int
"""稀有度"""

View File

@ -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(