diff --git a/src/jmcomic/__init__.py b/src/jmcomic/__init__.py index f314ecd7..90979c1a 100644 --- a/src/jmcomic/__init__.py +++ b/src/jmcomic/__init__.py @@ -2,7 +2,7 @@ # 被依赖方 <--- 使用方 # config <--- entity <--- toolkit <--- client <--- option <--- downloader -__version__ = '2.5.23' +__version__ = '2.5.24' from .api import * from .jm_plugin import * diff --git a/src/jmcomic/jm_toolkit.py b/src/jmcomic/jm_toolkit.py index 717ca70f..017f6752 100644 --- a/src/jmcomic/jm_toolkit.py +++ b/src/jmcomic/jm_toolkit.py @@ -25,31 +25,30 @@ class JmcomicText: pattern_html_album_album_id = compile(r'.*?:JM(\d+)') pattern_html_album_scramble_id = compile(r'var scramble_id = (\d+);') pattern_html_album_name = compile(r'

([\s\S]*?)

') - pattern_html_album_episode_list = compile(r'data-album="(\d+)">\n *?\n *' - r'第(\d+)話\n([\s\S]*?)\n *' - r'<[\s\S]*?>(\d+-\d+-\d+).*?') + pattern_html_album_episode_list = compile(r'data-album="(\d+)"\s*?>\s*?\s*?第(\d+)話([\s\S]*?)<[\s\S]*?>(\d+-\d+-\d+).*?') pattern_html_album_page_count = compile(r'.*?:(\d+)') pattern_html_album_pub_date = compile(r'>上架日期 : (.*?)') pattern_html_album_update_date = compile(r'>更新日期 : (.*?)') + pattern_html_tag_a = compile(r']*?>\s*(\S*)\s*') # 作品 pattern_html_album_works = [ compile(r''), - compile(r']*?>(.*?)') + pattern_html_tag_a, ] # 登場人物 pattern_html_album_actors = [ compile(r''), - compile(r']*?>(.*?)') + pattern_html_tag_a, ] # 标签 pattern_html_album_tags = [ compile(r'([\s\S]*?)'), - compile(r']*?>(.*?)') + pattern_html_tag_a, ] # 作者 pattern_html_album_authors = [ compile(r'作者: *'), - compile(r"]*?>(.*?)"), + pattern_html_tag_a, ] # 點擊喜歡 pattern_html_album_likes = compile(r'(.*?)') diff --git a/tests/test_jmcomic/test_jm_client.py b/tests/test_jmcomic/test_jm_client.py index c55dcacd..83134e87 100644 --- a/tests/test_jmcomic/test_jm_client.py +++ b/tests/test_jmcomic/test_jm_client.py @@ -71,7 +71,7 @@ def test_photo_sort(self): # 测试用例 - 多章本子 multi_photo_album_is = str_to_list(''' - 400222 + 282293 122061 ''')