v2.5.34: 更新html正则表达式域名,移除章节发布时间字段 (#408)
Some checks failed
Auto Release & Publish / release (push) Has been cancelled

This commit is contained in:
hect0x7 2025-04-06 23:14:16 +08:00 committed by GitHub
parent ec794f11d8
commit e4584d09bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ jobs:
test: # This code is based on https://github.com/gaogaotiantian/viztracer/blob/master/.github/workflows/python-package.yml test: # This code is based on https://github.com/gaogaotiantian/viztracer/blob/master/.github/workflows/python-package.yml
strategy: strategy:
matrix: matrix:
python-version: ['3.7', '3.8', '3.11', '3.12'] python-version: ['3.9', '3.10', '3.11', '3.13']
os: [ ubuntu-latest ] os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 5 timeout-minutes: 5

View File

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

View File

@ -457,10 +457,10 @@ class JmAlbumDetail(DetailEntity, Downloadable):
self.authors: List[str] = authors # 作者 self.authors: List[str] = authors # 作者
# 有的 album 没有章节,则自成一章。 # 有的 album 没有章节,则自成一章。
episode_list: List[Tuple[str, str, str, str]] episode_list: List[Tuple[str, str, str]]
if len(episode_list) == 0: if len(episode_list) == 0:
# photo_id, photo_index, photo_title, photo_pub_date # photo_id, photo_index, photo_title, photo_pub_date
episode_list = [(album_id, "1", name, pub_date)] episode_list = [(album_id, "1", name)]
else: else:
episode_list = self.distinct_episode(episode_list) episode_list = self.distinct_episode(episode_list)
@ -505,7 +505,7 @@ class JmAlbumDetail(DetailEntity, Downloadable):
raise IndexError(f'photo index out of range for album-{self.album_id}: {index} >= {length}') raise IndexError(f'photo index out of range for album-{self.album_id}: {index} >= {length}')
# ('212214', '81', '94 突然打來', '2020-08-29') # ('212214', '81', '94 突然打來', '2020-08-29')
pid, pindex, pname, _pub_date = self.episode_list[index] pid, pindex, pname = self.episode_list[index]
photo = JmModuleConfig.photo_class()( photo = JmModuleConfig.photo_class()(
photo_id=pid, photo_id=pid,

View File

@ -319,7 +319,7 @@ class ZipPlugin(JmOptionPlugin):
return ( return (
downloader.download_success_dict[album] downloader.download_success_dict[album]
if album is not None # after_album if album is not None # after_album
else downloader.download_success_dict[photo.from_album] # after_photo else downloader.download_success_dict[photo.from_album] # after_photo
) )
def zip_photo(self, photo, image_list: list, zip_path: str, path_to_delete): def zip_photo(self, photo, image_list: list, zip_path: str, path_to_delete):

View File

@ -25,7 +25,7 @@ class JmcomicText:
pattern_html_album_album_id = compile(r'<span class="number">.*?JM(\d+)</span>') pattern_html_album_album_id = compile(r'<span class="number">.*?JM(\d+)</span>')
pattern_html_album_scramble_id = compile(r'var scramble_id = (\d+);') pattern_html_album_scramble_id = compile(r'var scramble_id = (\d+);')
pattern_html_album_name = compile(r'<h1 class="book-name" id="book-name">([\s\S]*?)</h1>') pattern_html_album_name = compile(r'<h1 class="book-name" id="book-name">([\s\S]*?)</h1>')
pattern_html_album_episode_list = compile(r'data-album="(\d+)"[^>]*>\s*?<li.*?>\s*?第(\d+)話([\s\S]*?)<[\s\S]*?>(\d+-\d+-\d+).*?') pattern_html_album_episode_list = compile(r'data-album="(\d+)"[^>]*>\s*?<li.*?>\s*?第(\d+)[话]([\s\S]*?)<[\s\S]*?>')
pattern_html_album_page_count = compile(r'<span class="pagecount">.*?:(\d+)</span>') pattern_html_album_page_count = compile(r'<span class="pagecount">.*?:(\d+)</span>')
pattern_html_album_pub_date = compile(r'>上架日期 : (.*?)</span>') pattern_html_album_pub_date = compile(r'>上架日期 : (.*?)</span>')
pattern_html_album_update_date = compile(r'>更新日期 : (.*?)</span>') pattern_html_album_update_date = compile(r'>更新日期 : (.*?)</span>')
@ -693,7 +693,7 @@ class JmApiAdaptTool:
chapter = AdvancedDict(chapter) chapter = AdvancedDict(chapter)
# photo_id, photo_index, photo_title, photo_pub_date # photo_id, photo_index, photo_title, photo_pub_date
episode_list.append( episode_list.append(
(chapter.id, chapter.sort, chapter.name, None) (chapter.id, chapter.sort, chapter.name)
) )
fields['episode_list'] = episode_list fields['episode_list'] = episode_list
for it in 'scramble_id', 'page_count', 'pub_date', 'update_date': for it in 'scramble_id', 'page_count', 'pub_date', 'update_date':