mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
fix yiqing
This commit is contained in:
parent
5ec89e7538
commit
e68b154ddc
@ -158,7 +158,7 @@ async def update_setu_img():
|
||||
error_info = ['无报错..'] if not error_info else error_info
|
||||
await get_bot().send_private_msg(
|
||||
user_id=int(list(get_bot().config.superusers)[0]),
|
||||
message=f'{str(datetime.now()).split(".")[0]} 更新 色图 完成,本地群在 {count} 张,实际更新 {_success} 张,以下为更新时未知错误:\n'
|
||||
message=f'{str(datetime.now()).split(".")[0]} 更新 色图 完成,本地存在 {count} 张,实际更新 {_success} 张,以下为更新时未知错误:\n'
|
||||
+ "\n".join(error_info),
|
||||
)
|
||||
|
||||
|
||||
@ -25,12 +25,13 @@ async def get_yiqing_data(area: str):
|
||||
if area == '中国':
|
||||
province = area
|
||||
province_type = ""
|
||||
elif area[-1] != '省':
|
||||
elif area[-1] == '市' and area not in data.keys():
|
||||
area = area[:-1] if area[-1] == '市' else area
|
||||
for p in data.keys():
|
||||
if area in data[p]:
|
||||
province = p
|
||||
city = area
|
||||
elif area in data.keys() or area[:-1] in data.keys():
|
||||
elif area in data.keys():
|
||||
province = area if area[-1] != '省' else area[:-1]
|
||||
if len(data[province]) == 1:
|
||||
province_type = "市"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user