适配微信4.0.3正式版,修复图片解析失败的问题

This commit is contained in:
SiYuan
2025-04-09 12:38:05 +08:00
parent d95fc1972c
commit 9457ecdad7
9 changed files with 88 additions and 26 deletions

View File

@@ -17,7 +17,7 @@ from wxManager.log import logger
def get_image_type(header):
# 根据文件头判断图片类型
if header.startswith(b'\xFF\xD8'):
return 'jepg'
return 'jpeg'
elif header.startswith(b'\x89PNG'):
return 'png'
elif header[:6] in (b'GIF87a', b'GIF89a'):