Skip to content

Commit 65e1b01

Browse files
authored
v2.0.8: 修复解析JM车号的bug (#67)
1 parent 9f732da commit 65e1b01

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/jmcomic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# 被依赖方 <--- 使用方
33
# config <--- entity <--- toolkit <--- client <--- option
44

5-
__version__ = '2.0.7'
5+
__version__ = '2.0.8'
66

77
from .api import *

src/jmcomic/jm_toolkit.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ def parse_to_photo_id(cls, text) -> str:
5151
if not isinstance(text, str):
5252
raise AssertionError(f"无法解析jm车号, 参数类型为: {type(text)}")
5353

54+
# 43210
55+
if text.isdigit():
56+
return text
57+
58+
# Jm43210
5459
if len(text) <= 2:
5560
raise AssertionError(f"无法解析jm车号, 文本为: {text}")
5661

0 commit comments

Comments
 (0)