Skip to content

Commit e4584d0

Browse files
authored
v2.5.34: 更新html正则表达式域名,移除章节发布时间字段 (#408)
1 parent ec794f1 commit e4584d0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/test_html.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
test: # This code is based on https://github.com/gaogaotiantian/viztracer/blob/master/.github/workflows/python-package.yml
1717
strategy:
1818
matrix:
19-
python-version: ['3.7', '3.8', '3.11', '3.12']
19+
python-version: ['3.9', '3.10', '3.11', '3.13']
2020
os: [ ubuntu-latest ]
2121
runs-on: ${{ matrix.os }}
2222
timeout-minutes: 5

src/jmcomic/__init__.py

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

5-
__version__ = '2.5.33'
5+
__version__ = '2.5.34'
66

77
from .api import *
88
from .jm_plugin import *

src/jmcomic/jm_entity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,10 @@ def __init__(self,
457457
self.authors: List[str] = authors # 作者
458458

459459
# 有的 album 没有章节,则自成一章。
460-
episode_list: List[Tuple[str, str, str, str]]
460+
episode_list: List[Tuple[str, str, str]]
461461
if len(episode_list) == 0:
462462
# photo_id, photo_index, photo_title, photo_pub_date
463-
episode_list = [(album_id, "1", name, pub_date)]
463+
episode_list = [(album_id, "1", name)]
464464
else:
465465
episode_list = self.distinct_episode(episode_list)
466466

@@ -505,7 +505,7 @@ def create_photo_detail(self, index) -> JmPhotoDetail:
505505
raise IndexError(f'photo index out of range for album-{self.album_id}: {index} >= {length}')
506506

507507
# ('212214', '81', '94 突然打來', '2020-08-29')
508-
pid, pindex, pname, _pub_date = self.episode_list[index]
508+
pid, pindex, pname = self.episode_list[index]
509509

510510
photo = JmModuleConfig.photo_class()(
511511
photo_id=pid,

src/jmcomic/jm_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def get_downloaded_photo(self, downloader, album, photo):
319319
return (
320320
downloader.download_success_dict[album]
321321
if album is not None # after_album
322-
else downloader.download_success_dict[photo.from_album] # after_photo
322+
else downloader.download_success_dict[photo.from_album] # after_photo
323323
)
324324

325325
def zip_photo(self, photo, image_list: list, zip_path: str, path_to_delete):

src/jmcomic/jm_toolkit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class JmcomicText:
2525
pattern_html_album_album_id = compile(r'<span class="number">.*?:JM(\d+)</span>')
2626
pattern_html_album_scramble_id = compile(r'var scramble_id = (\d+);')
2727
pattern_html_album_name = compile(r'<h1 class="book-name" id="book-name">([\s\S]*?)</h1>')
28-
pattern_html_album_episode_list = compile(r'data-album="(\d+)"[^>]*>\s*?<li.*?>\s*?第(\d+)([\s\S]*?)<[\s\S]*?>(\d+-\d+-\d+).*?')
28+
pattern_html_album_episode_list = compile(r'data-album="(\d+)"[^>]*>\s*?<li.*?>\s*?第(\d+)[话話]([\s\S]*?)<[\s\S]*?>')
2929
pattern_html_album_page_count = compile(r'<span class="pagecount">.*?:(\d+)</span>')
3030
pattern_html_album_pub_date = compile(r'>上架日期 : (.*?)</span>')
3131
pattern_html_album_update_date = compile(r'>更新日期 : (.*?)</span>')
@@ -693,7 +693,7 @@ def post_adapt_album(cls, data: dict, _clazz: type, fields: dict):
693693
chapter = AdvancedDict(chapter)
694694
# photo_id, photo_index, photo_title, photo_pub_date
695695
episode_list.append(
696-
(chapter.id, chapter.sort, chapter.name, None)
696+
(chapter.id, chapter.sort, chapter.name)
697697
)
698698
fields['episode_list'] = episode_list
699699
for it in 'scramble_id', 'page_count', 'pub_date', 'update_date':

0 commit comments

Comments
 (0)