@@ -359,13 +359,7 @@ class JmPageTool:
359359
360360 # 用来提取搜索页面的的album的信息
361361 pattern_html_search_album_info_list = compile (
362- r'<a href="/album/(\d+)/.+"[\s\S]*?'
363- r'title="(.*?)"[\s\S]*?'
364- r'(<div class="label-category" style="">'
365- r'\n(.*)\n</div>\n<div class="label-sub" style=" ">'
366- r'(.*?)\n<[\s\S]*?)?'
367- r'<div class="title-truncate tags .*>\n'
368- r'(<a[\s\S]*?) </div>'
362+ r'<a href="/album/(\d+)/[\s\S]*?title="(.*?)"([\s\S]*?)<div class="title-truncate tags .*>([\s\S]*?)</div>'
369363 )
370364
371365 # 用来提取分类页面的的album的信息
@@ -383,7 +377,7 @@ class JmPageTool:
383377 # 查找错误,例如 [错误,關鍵字過短,請至少輸入兩個字以上。]
384378 pattern_html_search_error = compile (r'<fieldset>\n<legend>(.*?)</legend>\n<div class=.*?>\n(.*?)\n</div>\n</fieldset>' )
385379
386- pattern_html_search_total = compile (r'<span class="text-white">(\d+)</span> A漫.' ), 0
380+ pattern_html_search_total = compile (r'class="text-white">(\d+)</span> A漫.' ), 0
387381
388382 # 收藏页面的本子结果
389383 pattern_html_favorite_content = compile (
@@ -424,7 +418,9 @@ def parse_html_to_search_page(cls, html: str) -> JmSearchPage:
424418
425419 album_info_list = cls .pattern_html_search_album_info_list .findall (html )
426420
427- for (album_id , title , _ , label_category , label_sub , tag_text ) in album_info_list :
421+ for (album_id , title , _label_category_text , tag_text ) in album_info_list :
422+ # 从label_category_text中可以解析出label-category和label-sub
423+ # 这里不作解析,因为没什么用...
428424 tags = cls .pattern_html_search_tags .findall (tag_text )
429425 content .append ((
430426 album_id , {
0 commit comments