修复:特殊情况下查询深渊角色显示头像异常

This commit is contained in:
Wuyi无疑 2022-07-01 13:06:01 +08:00 committed by GitHub
parent cfb19604cc
commit 6d8ddf5033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,6 +168,8 @@ def get_char_pic(_id: str, url: str):
def get_char_done_pic(_id: str, url: str, star: int):
name = url.split('_')[-1]
url = 'https://upload-bbs.mihoyo.com/game_record/genshin/character_icon/UI_AvatarIcon_' + name
char_data = get(url).content
if star == 4:
star1_path = os.path.join(TEXT_PATH, '4star_1.png')
@ -1887,4 +1889,4 @@ async def draw_collect_card(uid: str, nickname: str, image: Optional[str] = None
bg_img.save(result_buffer, format='JPEG', subsampling=0, quality=90)
imgmes = 'base64://' + b64encode(result_buffer.getvalue()).decode()
resultmes = imgmes
return resultmes
return resultmes