哔哩轻小说

https://w.linovelib.com

tmygod (640)03/27 02:30

轉變正文抓取方式
二维码导入
{
    "bookSourceComment": "建议登录\n整理修改缝合:酷安 Wolken\n灰色章节修复目录部分By叶落岚起+关耳\/乃星改2021.8.3\n补丁 : 神秘人\n修复搜索问题\n修复发现榜单没图的问题\n修复章节内图片问题\n新補丁: 神秘人\n抓取源码中的关键字替换\n更新补丁\n更新补丁17\/9\n2023.9.27\n新补丁:酷安 @吉王义昊\n重新抓取源码中的关键字替换\n2023.9.27\n新补丁2nd:酷安 @吉王义昊\n修复插图不能正常加载的问题\n2023.9.30\n酷安 @吉王义昊\n添加登录URL\n清理了无用代码\n使用更易读的变量名\n2023.10.1\n酷安 @吉王义昊\n重新抓取源码中的关键字替换\n2023.10.1\n酷安 @吉王义昊\n在获取正文时自动拉取源码并解密进行关键字替换,一劳永逸(大概)解决问题\n注意:此版本会使网络请求次数增加一倍,并一定程度上减慢加载速度\n2023.10.1\n酷安 @吉王义昊\n增加登录URL和登录UI\n启用CookieJar\n去除章节名下方的URL\n修正了下一页获取导致的正文加载错误\n补全发现中的文库\n修正部分小说目录获取错误的问题\n2023.10.4\n神秘人\n根据网站代码更新修复\nfix dynamic variable name\n2023.10.6\n網站大更新先前方法失效,用會回webview\n2023.10.9\n正文用改用class来match看会不会好一点\n2023.10.13\n新的匹配方式\n2023.1111\n目錄不穩定修復\n2023.11.13\n正文中含有title修復\n2023.11.15\nua block fix, dynamic ua change everday\n2023.11.23\nfix some mirror redirect issue\n2023.12.16\nfix random duplicate text\n2023.12.16\nmore complete way to fix\n2024.1.1\nsearch fix, more stable\nsearch title fix\nmatch bug fix\n2024.1.17\nadd wait to catch rate limit\n2024.1.17\n整合发现(code from 柚屿☆)\n2024.1.19\nsome performance fix\n2024.3.27\nuse common ua to prevent ua block\nchange algorithm ",
    "bookSourceGroup": "轻小说",
    "bookSourceName": "哔哩轻小说",
    "bookSourceType": 0,
    "bookSourceUrl": "https:\/\/w.linovelib.com",
    "bookUrlPattern": "https:\/\/w.linovelib.com|https:\/\/www.bilinovel.com|https:\/\/tw.linovelib.com",
    "concurrentRate": "1000",
    "coverDecodeJs": "",
    "customOrder": 188,
    "enabled": true,
    "enabledCookieJar": true,
    "enabledExplore": true,
    "exploreUrl": "[{'title':'全部榜单','url':'','style':{layout_flexGrow:1,layout_flexBasisPercent:1}},\n{'title':'点击总榜','url':'\/wenku\/allvisit\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'点击月榜','url':'\/wenku\/monthvisit\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'点击周榜','url':'\/wenku\/weekvisit\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'推荐总榜','url':'\/wenku\/allvote\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'推荐月榜','url':'\/wenku\/monthvote\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'推荐周榜','url':'\/wenku\/weekvote\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'完结总点','url':'\/topfull\/allvisit\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'完结月点','url':'\/topfull\/monthvisit\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'完结周点','url':'\/topfull\/weekvisit\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'完结总推','url':'\/topfull\/allvote\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'完结月推','url':'\/topfull\/monthvote\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'完结周推','url':'\/topfull\/weekvote\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'收藏榜单','url':'\/topfull\/goodnum\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'字数榜单','url':'\/topfull\/words\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'新书榜单','url':'\/topfull\/postdate\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'更新榜单','url':'\/topfull\/lastupdate\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'编辑推荐','url':'\/topfull\/toptime\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'新书抢鲜','url':'\/top\/postdate\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'全部文库(更新时间)','url':'\/wenku\/lastupdate_0_0_0_0_0_0_0_{{page+1}}_0.html','style':{layout_flexGrow:1,layout_flexBasisPercent:1}},\n{'title':'电击文库','url':'\/wenku\/dengekibunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'富士见文库','url':'\/wenku\/fujimibunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'角川文库','url':'\/wenku\/kadokawabunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'MF文库J','url':'\/wenku\/emuefubunkojei\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'Fami通文库','url':'\/wenku\/famitsubunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'GA文库','url':'\/wenku\/gagraphicbunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'HJ文库','url':'\/wenku\/hobbyjapanbunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'一迅社','url':'\/wenku\/ichijinsha\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'集英社','url':'\/wenku\/shueisha\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'小学馆','url':'\/wenku\/shogakukan\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'讲谈社','url':'\/wenku\/kodansha\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'少女文库','url':'\/wenku\/teenagebunko\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'其他文库','url':'\/wenku\/other\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'华文轻小说','url':'\/wenku\/lightnovel\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'Web轻小说','url':'\/wenku\/weblightnovel\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:0.25}},\n{'title':'轻改漫画','url':'\/wenku\/comic\/{{page}}.html','style':{layout_flexGrow:1,layout_flexBasisPercent:1}},\n{'title':'全部分类','style':{layout_flexGrow:1,layout_flexBasisPercent:1}},\n{\"title\":\"恋爱 \",\"url\":\"\/tagarticle\/64\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"后宫 \",\"url\":\"\/tagarticle\/48\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"百合 \",\"url\":\"\/tagarticle\/27\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"女性视角 \",\"url\":\"\/tagarticle\/231\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"欢乐向 \",\"url\":\"\/tagarticle\/222\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"校园 \",\"url\":\"\/tagarticle\/63\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"龙傲天 \",\"url\":\"\/tagarticle\/219\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"妹妹 \",\"url\":\"\/tagarticle\/217\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"穿越 \",\"url\":\"\/tagarticle\/26\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"异世界 \",\"url\":\"\/tagarticle\/47\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"奇幻 \",\"url\":\"\/tagarticle\/15\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"冒险 \",\"url\":\"\/tagarticle\/61\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"病娇 \",\"url\":\"\/tagarticle\/198\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"人外 \",\"url\":\"\/tagarticle\/223\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"NTR \",\"url\":\"\/tagarticle\/256\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"性转 \",\"url\":\"\/tagarticle\/31\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"青梅竹马 \",\"url\":\"\/tagarticle\/225\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"青春 \",\"url\":\"\/tagarticle\/67\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"战斗 \",\"url\":\"\/tagarticle\/18\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"魔法 \",\"url\":\"\/tagarticle\/96\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"转生 \",\"url\":\"\/tagarticle\/158\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"大小姐 \",\"url\":\"\/tagarticle\/227\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"悬疑 \",\"url\":\"\/tagarticle\/68\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"黑暗 \",\"url\":\"\/tagarticle\/189\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"伪娘 \",\"url\":\"\/tagarticle\/201\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"战争 \",\"url\":\"\/tagarticle\/55\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"科幻 \",\"url\":\"\/tagarticle\/56\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"复仇 \",\"url\":\"\/tagarticle\/229\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"JK \",\"url\":\"\/tagarticle\/246\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"职场 \",\"url\":\"\/tagarticle\/60\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"异能 \",\"url\":\"\/tagarticle\/131\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"游戏 \",\"url\":\"\/tagarticle\/248\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"纯爱 \",\"url\":\"\/tagarticle\/52\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"斗智 \",\"url\":\"\/tagarticle\/199\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"经营 \",\"url\":\"\/tagarticle\/226\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"猎奇 \",\"url\":\"\/tagarticle\/241\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"耽美 \",\"url\":\"\/tagarticle\/228\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"JC \",\"url\":\"\/tagarticle\/304\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"女儿 \",\"url\":\"\/tagarticle\/261\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"治愈 \",\"url\":\"\/tagarticle\/98\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"机战 \",\"url\":\"\/tagarticle\/135\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"群像 \",\"url\":\"\/tagarticle\/245\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"轻文学 \",\"url\":\"\/tagarticle\/191\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"旅行 \",\"url\":\"\/tagarticle\/239\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"大逃杀 \",\"url\":\"\/tagarticle\/249\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"恶役 \",\"url\":\"\/tagarticle\/328\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"同人 \",\"url\":\"\/tagarticle\/333\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"推理 \",\"url\":\"\/tagarticle\/97\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"末日 \",\"url\":\"\/tagarticle\/221\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"美食 \",\"url\":\"\/tagarticle\/211\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"惊悚 \",\"url\":\"\/tagarticle\/124\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"犯罪 \",\"url\":\"\/tagarticle\/220\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"音乐 \",\"url\":\"\/tagarticle\/233\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"萝莉 \",\"url\":\"\/tagarticle\/185\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"日本文学 \",\"url\":\"\/tagarticle\/205\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"恐怖 \",\"url\":\"\/tagarticle\/125\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"脑洞 \",\"url\":\"\/tagarticle\/224\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"温馨 \",\"url\":\"\/tagarticle\/180\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"格斗 \",\"url\":\"\/tagarticle\/132\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"竞技 \",\"url\":\"\/tagarticle\/146\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"热血 \",\"url\":\"\/tagarticle\/28\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"宅文化 \",\"url\":\"\/tagarticle\/263\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"灵异 \",\"url\":\"\/tagarticle\/182\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"神怪 \",\"url\":\"\/tagarticle\/183\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}},{\"title\":\"间谍 \",\"url\":\"\/tagarticle\/254\/{{page}}.html\",\"style\":{\"layout_flexGrow\":1,\"layout_flexBasisPercent\":0.25}}]",
    "header": "<js>\n\n    var ua = cache.get(\"ua2\") ? cache.get(\"ua2\"):\"Mozilla\/5.0 (Linux; Android 9; SM-G955F) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/87.0.4280.101 Mobile Safari\/537.36\";\n    \/\/在沒有新ua的時候用一個preset的隨機ua\n    var headers = {\n    \t\"User-Agent\": ua,\n    \"Referer\":\"https:\/\/w.linovelib.com\/\"}; JSON.stringify(headers);\n\n<\/js>",
    "jsLib": "",
    "lastUpdateTime": 1711477814574,
    "loginUi": "[\n  {\n    \"name\": \"账号\",\n    \"type\": \"text\"\n  },\n  {\n    \"name\": \"密码\",\n    \"type\": \"password\"\n  }\n]",
    "loginUrl": "@js:\nfunction login() {\n  let une = source.getLoginInfoMap().get(\"账号\")\n  let pwd = source.getLoginInfoMap().get(\"密码\")\n  if (une && pwd) {\n    let body = String('username=' + une + '&password=' + pwd + '&usecookie=315360000&action=login')\n    let url = source.bookSourceUrl + '\/login.php'\n    let ck = java.post(url, body, { \"Content-Type\": \"application\/x-www-form-urlencoded\" }).cookies()\n    let header = JSON.stringify({\n      \"Cookie\": String(ck).match(\/\\{(.*?)\\}\/)[1].replace(\/,\/g, ';')\n    })\n    source.putLoginHeader(header)\n  }\n}",
    "respondTime": 180000,
    "ruleBookInfo": {
        "author": "[property=\"og:novel:author\"]@content",
        "canReName": "",
        "coverUrl": "[property=\"og:image\"]@content",
        "intro": "id.bookSummary@tag.content@textNodes\n@js:\nif(!cache.get(\"ua2\")){   \n\th=JSON.parse(java.ajax(\"https:\/\/raw.githubusercontent.com\/microlinkhq\/top-user-agents\/master\/src\/desktop.json\"))\njava.log(h.length)\nx =Math.floor(Math.random() *h.length)\njava.log(h[x])\t\ncache.put(\"ua2\", h[x],86400);\n    \t}\nresult=\"  \"+result;",
        "kind": "class.book-cell@tag.p.1@ownText&&class.tag-small red@text\n##.*万字|·.*",
        "lastChapter": "class.gray ell@text##(\\d+-\\d+-\\d+\\s\\d+:\\d+)·(.*)##$2 • $1",
        "name": "[property=\"og:novel:book_name\"]@content",
        "tocUrl": "class.btn-normal red@href",
        "wordCount": "class.book-cell@tag.p.1@ownText##连载|完结"
    },
    "ruleContent": {
        "content": "<js>\nif(!cache.get(\"ua2\")){   \n\th=JSON.parse(java.ajax(\"https:\/\/raw.githubusercontent.com\/microlinkhq\/top-user-agents\/master\/src\/desktop.json\"))\njava.log(h.length)\nx =Math.floor(Math.random() *h.length)\njava.log(h[x])\t\ncache.put(\"ua2\", h[x],86400);\n    \t}\n\/\/!(\/google.cn\/).test(baseUrl)?h=java.getString(\"id.acontent@html\"):h=decodeURIComponent(baseUrl.replace(\/^.*?text=\/, ''));\nurl = baseUrl.replace(\"www.bilinovel.com\",\"tw.linovelib.com\")\n\/\/re = java.ajax(baseUrl)\n\/\/re = java.ajax(url)\n\/\/h = java.webView(null,url,null);\n\/\/java.setContent(re); \nh = java.webView(null,baseUrl,null);\n\/\/java.log(h)\njava.setContent(h)\n\nh=java.getElements(\"tag.body@tag.div.5@children\").not(\"[data-ad-client]\").not(\"script\")\/\/Clear ads\n\/\/END\nif(0){\/\/jump old codes\n\noriginal_list = java.getElements(\"tag.body@tag.div.5@children\")\n\njava.setContent(h)\nh = java.getElements(\"tag.body@tag.div.5@children\");\n\/\/java.log(h[4])\n\/\/java.log(h.length)\nif(h.length!=original_list.length){\/\/there is repeat item\n\t\n\n\/\/replace to correct text\nfunction confident(str1, str2){\n\tif(str1.length!=str2.length){\n\t\treturn false; \n\t\t}\n\t\tif(str1.length==0){\n\t\t\treturn true;\n\t\t\t}\n\t\tconfidence =0;\n\t\ttarget = Math.max(1,Math.floor(str1.length\/2));\n\tfor(let i=0;i<str1.length;i++){\n\t\tif(str1[i]==str2[i]){\n\t\t\tconfidence++;\n\t\t\tif(confidence>=target){\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\nk=0\nfor(let i=0;i<original_list.length;i++){\nif(k>=h.length){\nbreak;\n}\nele = original_list[i]\nstr = String(java.getString(\"text\",ele));\nstrcom = String(java.getString(\"text\",h[k]));\njava.log(str)\njava.log(strcom)\n\/\/java.log(str.length)\n\/\/java.log(strcom.length)\nwhile(k<h.length&&!confident(str,strcom)){\nk++\nstrcom = String(java.getString(\"text\",h[k]));\njava.log(\"x\")\njava.log(strcom)\n\/\/java.log(strcom.length)\n}\n\nif(k<h.length){\nif(java.getString(\"tag.script@all\",ele)!= \"\"){\noriginal_list[i] = h[0]\n}else{\noriginal_list[i] = h[k]\n}\n}\n\nk++\n}\nh = original_list\n}\/\/close repeat item\nelse\n{\n\th = java.getString(\"tag.body@tag.div.5@html\")\n\t}\n\/\/run readtools.js match words\n\/\/run js file's last line\n\/\/jsLink = java.getString(\"tag.script@src\").match(new RegExp(\"https.+readtools.+\", \"gi\"))[0];\n\/\/h=String(h);\n\/\/code = String(java.ajax(jsLink)).trim().split(\"\\n\").pop().trim().split(\";\")[1];\n}\/\/end of old code\nh\n<\/js>\n",
        "imageDecode": "",
        "imageStyle": "FULL",
        "nextContentUrl": "##url_next:'([^']*)'##$1###\n@js:\n\/\/121_2.html这样的是下一页,纯数字则是下一章\n\/\/带有catalog是详情页\nvar isNew=\/(\\\/(\\d+).html)|catalog\/.test(result);\nvar out=isNew?'':result;\nout",
        "replaceRegex": "<js>\njava.log(666)\njava.log(result)\n<\/js>\n##((?<=[\\u4e00-\\u9fa5“‘「(,])\\s+)?<!--\\s*\\(继续下一页\\)\\s*-->\\s*|((?<=[\\u4e00-\\u9fa5“‘「(,])\\s+)?\\(本章未完\\)\\s*|"
    },
    "ruleExplore": {
        "author": "class.book-author@ownText",
        "bookList": "\n@js:\nif(!cache.get(\"ua2\")){   \n\th=JSON.parse(java.ajax(\"https:\/\/raw.githubusercontent.com\/microlinkhq\/top-user-agents\/master\/src\/desktop.json\"))\njava.log(h.length)\nx =Math.floor(Math.random() *h.length)\njava.log(h[x])\t\ncache.put(\"ua2\", h[x],86400);\n    \t}\npath = 'class.book-li';\nc=java.getElement(path);\nif( !c.length && result.includes('no-js')){\n  res = java.startBrowserAwait(baseUrl,'等待至跳转,然后重搜');\n                AimTime = Date.now()+3000;\n                while(AimTime > Date.now()){}\n  result = java.ajax(baseUrl)\/\/ajax result after wait\n  java.log(result)\n  java.setContent(result)\n  c=java.getElement(path);\n}\nif(!c.length){\n\tc=[result]\n\t}\nc",
        "bookUrl": "a@href",
        "coverUrl": "img@data-src",
        "intro": "class.book-desc@text",
        "kind": "class.tag-small-group origin-right@tag.em.0@text&&\nclass.tag-small-group origin-right@tag.em.1@text",
        "name": "class.book-title@text",
        "wordCount": "class.tag-small blue@text"
    },
    "ruleReview": {},
    "ruleSearch": {
        "author": "class.book-author@textNodes",
        "bookList": "@js:\npath = 'class.book-ol book-ol-normal@tag.li';\nc=java.getElement(path);\nif( !c.length && result.includes('no-js')){\n  res = java.startBrowserAwait(baseUrl,'等待至跳转,然后重搜');\n                AimTime = Date.now()+3000;\n                while(AimTime > Date.now()){}\n  result = java.ajax(baseUrl)\/\/ajax result after wait\n  java.log(result)\n  java.setContent(result)\n  c=java.getElement(path);\n}\nif(!c.length){\n\tc=[result]\n\t}\nc",
        "bookUrl": "tag.a.0@href",
        "checkKeyWord": "我的青春恋爱喜剧",
        "coverUrl": "[property=\"og:image\"]@content||a@href@js:\nvar id = result.match(\/\\\/(\\d+)\\.html\/)[1];\n'https:\/\/www.linovelib.com\/files\/article\/image\/'+parseInt(id\/1000)+'\/'+id+'\/'+id+'s.jpg';",
        "intro": "id.bookSummary@tag.content@textNodes||\nclass.book-desc@text",
        "kind": "class.tag-small-group origin-right@tag.em@text||\nclass.book-cell@tag.p.1@ownText&&class.tag-small red@text\n##.*万字|·.*",
        "name": "class.book-title.0@text"
    },
    "ruleToc": {
        "chapterList": "id.volumes @tag.li\n@js:\nif(!cache.get(\"ua2\")){   \n\th=JSON.parse(java.ajax(\"https:\/\/raw.githubusercontent.com\/microlinkhq\/top-user-agents\/master\/src\/desktop.json\"))\njava.log(h.length)\nx =Math.floor(Math.random() *h.length)\njava.log(h[x])\t\ncache.put(\"ua2\", h[x],86400);\n    \t}\n    \/\/现实debug(尝试修复正文链接问题,和目录不全)\n    \/\/<<好友角色的我怎么可能大受欢迎>>第三卷12\n    \/\/<<我的青春恋爱喜剧>>\n    \/\/2022-8-19\n    \/\/原来的代码在源注释(已移除)\n    \/\/2022-8-20修复https:\/\/w.linovelib.com\/novel\/2765.html目录加载失败\n    \/\/2023-9-30使用易于理解的变量命名\n\nres = result\n\nfor (i = 0; i < res.length; i++) {\n    java.setContent(res[i])\n    if (String(java.getString(\"tag.a@href\")).match(\/javascript:cid\\(.*\\)\/)) {\njava.log(java.getString(\"tag.a@text\"))\n        if (i == res.length - 1) {\n            java.setContent(res[i - 1])\n            prevLink = java.getString(\"tag.a@href\")\n            if (prevLink == \"\") {\n                java.setContent(res[i - 2])\n                prevLink = java.getString(\"tag.a@href\")\n            }\n            prev = java.ajax(\"https:\/\/www.bilinovel.com\" + prevLink)\n            java.setContent(prev)\n            foot = java.getElements(\"id.footlink\")\n\n            while (foot.indexOf(\"下一页\") != -1) {\n                str = d1.match(\/<script type\\=\\\"text\\\/javascript\\\">var ReadParams.*\/)\n                path = String(str).match(\/url_next\\:'.*?html\/)[0].replace(\"url_next:'\", \"\")\n                content = java.ajax(\"https:\/\/www.bilinovel.com\" + path)\n                java.setContent(content)\n                foot = java.getElements(\"id.footlink\")\n            }\n\n            str = next.match(\/<script type\\=\\\"text\\\/javascript\\\">var ReadParams.*\/)\n            path = String(str).match(\/url_next\\:'.*?html\/)[0].replace(\"url_next:'\", \"\")\n            java.log(path)\n\/\/java.log(String(res[i]).replace(\/javascript:cid\\(.*\\)\/, path))\n            res[i] = String(res[i]).replace(\/javascript:cid\\(.*\\)\/, path)\n\/\/            res[i] = path\n \n       } else {\n            java.setContent(res[i + 1])\n            nextLink = java.getString(\"tag.a@href\")\n            if (nextLink == \"\") {\n                java.setContent(res[i + 2])\n                nextLink = java.getString(\"tag.a@href\")\n            }\n           next = \"error code: 1015\"\n            while(next == \"error code: 1015\"){\n                 next = String(java.ajax(\"https:\/\/www.bilinovel.com\" + nextLink));\n                if(next != \"error code: 1015\"){break;}\n                AimTime = Date.now()+3000;\n                while(AimTime > Date.now()){}\n            }\n            str = next.match(\/<script type\\=\\\"text\\\/javascript\\\">var ReadParams.*\/)\n            path = String(str).match(\/url_previous\\:'.*?html\/)[0].replace(\"url_previous:'\", \"\")\n            java.log(path)\n\n            res[i] = String(res[i]).replace(\/javascript:cid\\(.*\\)\/, path)\n        }\n    }\n}\nres",
        "chapterName": "text",
        "chapterUrl": "tag.a@href",
        "isVolume": "@js:\njava.getString(\"tag.a@href\")==\"\"",
        "updateTime": ""
    },
    "searchUrl": "<js>\nif(!cache.get(\"ua2\")){   \n\th=JSON.parse(java.ajax(\"https:\/\/raw.githubusercontent.com\/microlinkhq\/top-user-agents\/master\/src\/desktop.json\"))\njava.log(h.length)\nx =Math.floor(Math.random() *h.length)\njava.log(h[x])\t\ncache.put(\"ua2\", h[x],86400);\n    \t}else{java.log(cache.get(\"ua2\"))}\npage==1?\n\"\/search.html?searchkey={{key}}&searchtype=all,{'webView': true}\"\n:\n\n\"\/search\/{{key}}_{{page}}.html,{'webView': true}\"\n<\/js>",
    "variableComment": "",
    "weight": 0
}
站长推荐
广告