gedoor / legado

Legado 3.0 Book Reader with powerful controls & full functions❤️阅读3.0, 阅读是一款可以自定义来源阅读网络内容的工具,为广大网络文学爱好者提供一种方便、快捷舒适的试读体验。
GNU General Public License v3.0
28.62k stars 3.82k forks source link

class.txtnav@!1@html移除了超过2个标签的内容 #4080

Closed zhangzw218 closed 2 weeks ago

zhangzw218 commented 1 month ago

确认 / Assignments

问题描述 / Describe Bugs

class.txtnav@!1@html,这一句,我想要的是移除前2个标签 但实际效果时,移除了超过2个标签的内容

image

image

复现步骤 / How to reproduce

源:

{
    "bookSourceComment": "需要挂梯子",
    "bookSourceGroup": ".天星,.69书吧",
    "bookSourceName": "69书吧-69shuba.cx",
    "bookSourceType": 0,
    "bookSourceUrl": "https://69shuba.cx/",
    "bookUrlPattern": "https://69shuba.cx/book/\\d+.htm",
    "concurrentRate": "20/60000",
    "customOrder": 95,
    "enabled": true,
    "enabledCookieJar": false,
    "enabledExplore": false,
    "header": "{\n    \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36\", \"Accept-Language\":\"zh-CN,zh-TW;q=0.9,zh;q=0.8,en;q=0.7\"}",
    "lastUpdateTime": 1723305866569,
    "loginUrl": "https://69shuba.cx/",
    "respondTime": 70369,
    "ruleBookInfo": {
        "author": "[property$=author]@content",
        "coverUrl": "[property$=image]@content",
        "intro": "更新:\n{{@@[property$=update_time]@content}}\n简介:\n{{@@class.navtxt@p.0@html}}",
        "kind": "[property~=category|status|update_time]@content&&.infolist@li.1@text##节数",
        "lastChapter": "[property$=chapter_name]@content\n##\\d+\\.|(.*|\\(.*|【.*|(零|一|二|三|四|五|六|七|八|九|十|百|千|万)(.|\\s)*章|“|”\n@js:result\n.replace(\"••\",\"\")\n.replace(/^(\\d+).第/,'第')\n.replace(/^(正文|VIP章节|最新章节)?(\\s+|_)|[\\(\\{({【].*[求更谢乐发推票盟补加字Kk\\/].*[\\)\\})}】]/g,'')\n.replace(/^(\\d+)[、.]第.+章/,'第$1章')\n.replace(/^(\\d+)、\\d+、/,'第$1章 ')\n.replace(/^(\\d+)、\\d+/,'第$1章')\n.replace(/^(第.+章)\\s?\\d+/,'$1')\n.replace(/^(\\d+)、/,'第$1章 ')\n.replace(/^(第.+章)\\s?第.+章/,'$1')\n.replace(/第\\s(.+)\\s章/,'第$1章')\n.replace(/.*(chapter|Chapter)\\s?(\\d+)\\s?/,'$1 $2 ')\n.replace(/\\(.+\\)/,'')\n.replace(/\\[|。/,'')\n.replace(/第([零一二三四五六七八九十百千]+)章/g,java.toNumChapter(result))\n##(章)([^\\s]+)(\\s·)##$1 $2$3",
        "name": "[property$=book_name]@content",
        "tocUrl": "text.完整目录@href||class.btn more-btn@href##.*?com",
        "wordCount": ".infolist@li.0@textNodes"
    },
    "ruleContent": {
        "content": "class.txtnav@!1@html",
        "replaceRegex": "##{{book.durChapterTitle}}|.*作者:.*|\\(本章完\\)|PS:.*求推荐!|PS:.*求收藏!|.*第.*章.*|感谢.*打赏.*|感谢.*推荐票.*|感谢.*月票.*|(.*月票.*)|(为大家的.*票加更.*)|第二更在.*",
        "title": ""
    },
    "ruleExplore": {},
    "ruleReview": {},
    "ruleSearch": {
        "author": "tag.label.0@text",
        "bookList": "class.newbox@ul@li",
        "bookUrl": "class.btn btn-tp@href",
        "coverUrl": "tag.img@data-src",
        "intro": "tag.ol.0@text",
        "kind": "tag.label.1@text&&tag.label.2@text",
        "name": "h3@text"
    },
    "ruleToc": {
        "chapterList": "-id.catalog@ul@li@a",
        "chapterName": "text",
        "chapterUrl": "href##$##$,{\"webView\":true}"
    },
    "searchUrl": "https://69shuba.cx/modules/article/search.php,{\n\t\"charset\": \"gbk\", \"method\": \"POST\", \"body\": \"searchkey={{key}}&searchtype=all\"}",
    "weight": 0
}

调试语句:--https://69shuba.cx/txt/50731/38812473,{"webView":true}

确认 / Assignment

其他信息 / Additions

No response

日志提交 / Relevant log output

No response

阅读版本 / Legado version

3.24.081100

Android版本 / Android version

鸿蒙4

机型 / Model

华为p40

821938089 commented 1 month ago

取children时文本节点会被去掉

github-actions[bot] commented 2 weeks ago

由于长期没有状态更新,该问题将于5天后自动关闭。如有需要可重新打开。