From 6d8ddf5033a4281ed686b07c75ec96257a149f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wuyi=E6=97=A0=E7=96=91?= <444835641@qq.com> Date: Fri, 1 Jul 2022 13:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B`=E6=9F=A5=E8=AF=A2=E6=B7=B1?= =?UTF-8?q?=E6=B8=8A`=E8=A7=92=E8=89=B2=E6=98=BE=E7=A4=BA=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mihoyo_libs/get_image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mihoyo_libs/get_image.py b/mihoyo_libs/get_image.py index ad5d07f5..194398f4 100644 --- a/mihoyo_libs/get_image.py +++ b/mihoyo_libs/get_image.py @@ -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 \ No newline at end of file + return resultmes