66class JmcomicText :
77 pattern_jm_domain = compile (r'https://([\w.-]+)' )
88 pattern_jm_pa_id = [
9- (compile (r'(photos?|album )/(\d+)' ), 2 ),
9+ (compile (r'(photos?|albums? )/(\d+)' ), 2 ),
1010 (compile (r'id=(\d+)' ), 1 ),
1111 ]
1212 pattern_html_jm_pub_domain = compile (r'[\w-]+\.\w+/?\w+' )
@@ -25,31 +25,30 @@ 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+)">\n *?<li.*?>\n *'
29- r'第(\d+)話\n([\s\S]*?)\n *'
30- r'<[\s\S]*?>(\d+-\d+-\d+).*?' )
28+ pattern_html_album_episode_list = compile (r'data-album="(\d+)"\s*?>\s*?<li.*?>\s*?第(\d+)話([\s\S]*?)<[\s\S]*?>(\d+-\d+-\d+).*?' )
3129 pattern_html_album_page_count = compile (r'<span class="pagecount">.*?:(\d+)</span>' )
3230 pattern_html_album_pub_date = compile (r'>上架日期 : (.*?)</span>' )
3331 pattern_html_album_update_date = compile (r'>更新日期 : (.*?)</span>' )
32+ pattern_html_tag_a = compile (r'<a[^>]*?>\s*(\S*)\s*</a>' )
3433 # 作品
3534 pattern_html_album_works = [
3635 compile (r'<span itemprop="author" data-type="works">([\s\S]*?)</span>' ),
37- compile ( r'<a[^>]*?>(.*?)</a>' )
36+ pattern_html_tag_a ,
3837 ]
3938 # 登場人物
4039 pattern_html_album_actors = [
4140 compile (r'<span itemprop="author" data-type="actor">([\s\S]*?)</span>' ),
42- compile ( r'<a[^>]*?>(.*?)</a>' )
41+ pattern_html_tag_a ,
4342 ]
4443 # 标签
4544 pattern_html_album_tags = [
4645 compile (r'<span itemprop="genre" data-type="tags">([\s\S]*?)</span>' ),
47- compile ( r'<a[^>]*?>(.*?)</a>' )
46+ pattern_html_tag_a ,
4847 ]
4948 # 作者
5049 pattern_html_album_authors = [
5150 compile (r'作者: *<span itemprop="author" data-type="author">([\s\S]*?)</span>' ),
52- compile ( r"<a[^>]*?>(.*?)</a>" ) ,
51+ pattern_html_tag_a ,
5352 ]
5453 # 點擊喜歡
5554 pattern_html_album_likes = compile (r'<span id="albim_likes_\d+">(.*?)</span>' )
0 commit comments