mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-06-03 05:59:51 +08:00
同步修复(closed #130)
This commit is contained in:
parent
8cfeafc85a
commit
d98d95e53a
@ -1170,7 +1170,7 @@ async def draw_pic(uid: str, nickname: str, image: Optional[Match] = None, mode:
|
|||||||
text_draw.text((245, 477), str(raw_data['stats']['precious_chest_number']), text_color, genshin_font(24))
|
text_draw.text((245, 477), str(raw_data['stats']['precious_chest_number']), text_color, genshin_font(24))
|
||||||
text_draw.text((245, 528), str(raw_data['stats']['luxurious_chest_number']), text_color, genshin_font(24))
|
text_draw.text((245, 528), str(raw_data['stats']['luxurious_chest_number']), text_color, genshin_font(24))
|
||||||
|
|
||||||
mondstadt = liyue = dragonspine = inazuma = offering = dict()
|
mondstadt = liyue = dragonspine = inazuma = offering = chasms_maw = under_chasms_maw = dict()
|
||||||
for i in raw_data['world_explorations']:
|
for i in raw_data['world_explorations']:
|
||||||
if i["name"] == "蒙德":
|
if i["name"] == "蒙德":
|
||||||
mondstadt = i
|
mondstadt = i
|
||||||
@ -1183,16 +1183,16 @@ async def draw_pic(uid: str, nickname: str, image: Optional[Match] = None, mode:
|
|||||||
elif i["name"] == "渊下宫":
|
elif i["name"] == "渊下宫":
|
||||||
offering = i
|
offering = i
|
||||||
elif i["name"] == "璃月层岩巨渊":
|
elif i["name"] == "璃月层岩巨渊":
|
||||||
ChasmsMaw = i
|
chasms_maw = i
|
||||||
elif i["name"] == "璃月层岩巨渊·地下矿区":
|
elif i["name"] == "璃月层岩巨渊·地下矿区":
|
||||||
UnderChasmsMaw = i
|
under_chasms_maw = i
|
||||||
|
|
||||||
# 层岩巨渊
|
# 层岩巨渊
|
||||||
text_draw.text((477, 727), str(ChasmsMaw['exploration_percentage'] / 10) + '%', text_color,
|
text_draw.text((477, 727), str(chasms_maw['exploration_percentage'] / 10) + '%', text_color,
|
||||||
genshin_font(22))
|
genshin_font(22))
|
||||||
text_draw.text((523, 753), str(UnderChasmsMaw['exploration_percentage'] / 10) + '%', text_color,
|
text_draw.text((523, 753), str(under_chasms_maw['exploration_percentage'] / 10) + '%', text_color,
|
||||||
genshin_font(22))
|
genshin_font(22))
|
||||||
text_draw.text((500, 782), 'lv.' + str(UnderChasmsMaw['offerings'][0]['level']), text_color, genshin_font(22))
|
text_draw.text((500, 782), 'lv.' + str(under_chasms_maw['offerings'][0]['level']), text_color, genshin_font(22))
|
||||||
|
|
||||||
# 蒙德
|
# 蒙德
|
||||||
text_draw.text((235, 600), str(mondstadt['exploration_percentage'] / 10) + '%', text_color,
|
text_draw.text((235, 600), str(mondstadt['exploration_percentage'] / 10) + '%', text_color,
|
||||||
@ -1695,7 +1695,15 @@ async def draw_event_pic() -> None:
|
|||||||
k["time_data"] = time_data
|
k["time_data"] = time_data
|
||||||
elif value.text == "〓活动时间〓":
|
elif value.text == "〓活动时间〓":
|
||||||
time_data = content_bs.find_all("p")[index + 1].text
|
time_data = content_bs.find_all("p")[index + 1].text
|
||||||
time_data = time_data.replace("</t>", "")[16:]
|
if "<t class=" in time_data:
|
||||||
|
time_datas = []
|
||||||
|
for s in time_data.split(" ~ "):
|
||||||
|
if "<t class=" in s:
|
||||||
|
time_datas.append(findall("<[a-zA-Z]+.*?>([\s\S]*?)</[a-zA-Z]*?>", s)[0])
|
||||||
|
else:
|
||||||
|
time_datas.append(s)
|
||||||
|
k["time_data"] = "——".join(time_datas)
|
||||||
|
else:
|
||||||
k["time_data"] = time_data
|
k["time_data"] = time_data
|
||||||
elif value.text == "〓祈愿介绍〓":
|
elif value.text == "〓祈愿介绍〓":
|
||||||
start_time = content_bs.find_all("tr")[1].td.find_all("p")[0].text
|
start_time = content_bs.find_all("tr")[1].td.find_all("p")[0].text
|
||||||
@ -1705,7 +1713,7 @@ async def draw_event_pic() -> None:
|
|||||||
content_bs.find_all("tr")[1].td.find_all("p")[2].text)[0]
|
content_bs.find_all("tr")[1].td.find_all("p")[2].text)[0]
|
||||||
if "<t class=" in end_time:
|
if "<t class=" in end_time:
|
||||||
end_time = findall("<[a-zA-Z]+.*?>([\s\S]*?)</[a-zA-Z]*?>", end_time)[0]
|
end_time = findall("<[a-zA-Z]+.*?>([\s\S]*?)</[a-zA-Z]*?>", end_time)[0]
|
||||||
time_data = start_time + "~" + end_time
|
time_data = start_time + "——" + end_time
|
||||||
k["time_data"] = time_data
|
k["time_data"] = time_data
|
||||||
|
|
||||||
if "冒险助力礼包" in k["title"] or "纪行" in k["title"]:
|
if "冒险助力礼包" in k["title"] or "纪行" in k["title"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user