mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-31 04:30:29 +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, 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']:
|
||||
if i["name"] == "蒙德":
|
||||
mondstadt = i
|
||||
@ -1183,16 +1183,16 @@ async def draw_pic(uid: str, nickname: str, image: Optional[Match] = None, mode:
|
||||
elif i["name"] == "渊下宫":
|
||||
offering = i
|
||||
elif i["name"] == "璃月层岩巨渊":
|
||||
ChasmsMaw = i
|
||||
chasms_maw = i
|
||||
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))
|
||||
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))
|
||||
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,
|
||||
@ -1591,13 +1591,13 @@ async def draw_info_pic(uid: str, image: Optional[Match] = None) -> str:
|
||||
else:
|
||||
resin_recovery_time = seconds2hours(
|
||||
daily_data['resin_recovery_time'])
|
||||
next_resin_rec_time = seconds2hours(
|
||||
8 * 60 - ((daily_data['max_resin'] - daily_data['current_resin']) * 8 * 60 - int(
|
||||
daily_data['resin_recovery_time'])))
|
||||
text_draw.text((268, 305), f" {next_resin_rec_time}", text_color, genshin_font(18), anchor="lm")
|
||||
next_resin_rec_time = seconds2hours(
|
||||
8 * 60 - ((daily_data['max_resin'] - daily_data['current_resin']) * 8 * 60 - int(
|
||||
daily_data['resin_recovery_time'])))
|
||||
text_draw.text((268, 305), f" {next_resin_rec_time}", text_color, genshin_font(18), anchor="lm")
|
||||
|
||||
text_draw.text((170, 331), f"预计 后全部恢复", text_color, genshin_font(18), anchor="lm")
|
||||
text_draw.text((208, 331), f"{resin_recovery_time}", highlight_color, genshin_font(18), anchor="lm")
|
||||
text_draw.text((170, 331), f"预计 后全部恢复", text_color, genshin_font(18), anchor="lm")
|
||||
text_draw.text((208, 331), f"{resin_recovery_time}", highlight_color, genshin_font(18), anchor="lm")
|
||||
|
||||
# 洞天宝钱时间计算
|
||||
coin_rec_time = seconds2hours(int(daily_data["home_coin_recovery_time"]))
|
||||
@ -1695,8 +1695,16 @@ async def draw_event_pic() -> None:
|
||||
k["time_data"] = time_data
|
||||
elif value.text == "〓活动时间〓":
|
||||
time_data = content_bs.find_all("p")[index + 1].text
|
||||
time_data = time_data.replace("</t>", "")[16:]
|
||||
k["time_data"] = time_data
|
||||
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
|
||||
elif value.text == "〓祈愿介绍〓":
|
||||
start_time = content_bs.find_all("tr")[1].td.find_all("p")[0].text
|
||||
if "<t class=" in start_time:
|
||||
@ -1705,7 +1713,7 @@ async def draw_event_pic() -> None:
|
||||
content_bs.find_all("tr")[1].td.find_all("p")[2].text)[0]
|
||||
if "<t class=" in end_time:
|
||||
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
|
||||
|
||||
if "冒险助力礼包" in k["title"] or "纪行" in k["title"]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user