v2.3.8: 修复图片在带query参数时,是否解码逻辑失效的bug (#149)

This commit is contained in:
hect0x7 2023-10-17 19:19:58 +08:00 committed by GitHub
parent ad9427aceb
commit f4babde82f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# 被依赖方 <--- 使用方
# config <--- entity <--- toolkit <--- client <--- option <--- downloader
__version__ = '2.3.7'
__version__ = '2.3.8'
from .api import *
from .jm_plugin import *

View File

@ -271,7 +271,14 @@ class JmImageClient:
raise NotImplementedError
@classmethod
def img_is_not_need_to_decode(cls, data_original: str, _resp):
def img_is_not_need_to_decode(cls, data_original: str, _resp) -> bool:
# https://cdn-msp2.18comic.vip/media/photos/498976/00027.gif?v=1697541064
query_params_index = data_original.find('?')
if query_params_index != -1:
data_original = data_original[:query_params_index]
# https://cdn-msp2.18comic.vip/media/photos/498976/00027.gif
return data_original.endswith('.gif')