幻影小说网

https://www.huiysj.com/

dynasty_97 (14131)07/05 01:35

在前辈大佬的基础上做了如下修改

1、修复目录拼接缺章、乱序问题

2、优化目录加载慢(一定程度上)

3、修复部分章节内容获取失败

目前存在问题:

个别书籍的个别章节加载失败(如天衍录第3章),原因未找到

注意:

本书源很多书籍内容残缺不全,凡是章节末尾出现“后续内容已被隐藏,请升级VIP会员后继续阅读。”内容,说明本章内容不全

二维码导入
{
    "bookSourceComment": "Tips:\n1、修复目录拼接缺章、乱序问题\n2、优化目录加载慢(一定程度上)\n3、修复部分章节内容获取失败\n目前存在问题:\n个别书籍的个别章节加载失败(如天衍录第3章),原因未找到",
    "bookSourceGroup": "小说",
    "bookSourceName": "幻影小说网",
    "bookSourceType": 0,
    "bookSourceUrl": "https:\/\/www.huiysj.com\/",
    "bookUrlPattern": "https:\/\/www.huiysj.com\/kuaishou\/.*\/index.html",
    "customOrder": 4,
    "enabled": true,
    "enabledCookieJar": false,
    "enabledExplore": true,
    "exploreUrl": "玄幻修真::https:\/\/www.huiysj.com\/book\/1\/{{page}}.html\n重生穿越::https:\/\/www.huiysj.com\/book\/2\/{{page}}.html\n都市小说::https:\/\/www.huiysj.com\/book\/3\/{{page}}.html\n军史小说::https:\/\/www.huiysj.com\/book\/4\/{{page}}.html\n网游小说::https:\/\/www.huiysj.com\/book\/5\/{{page}}.html\n科幻小说::https:\/\/www.huiysj.com\/book\/6\/{{page}}.html\n灵异小说::https:\/\/www.huiysj.com\/book\/7\/{{page}}.html\n言情小说::https:\/\/www.huiysj.com\/book\/8\/{{page}}.html\n其他小说::https:\/\/www.huiysj.com\/book\/9\/{{page}}.html",
    "header": "{\"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/120.0.0.0 Safari\/537.36\"}",
    "lastUpdateTime": "1783186551584",
    "respondTime": 180000,
    "ruleBookInfo": {
        "author": ".details .p a@text",
        "coverUrl": ".img img@src",
        "intro": ".details .p2@text",
        "kind": "meta[property=og:novel:category]@content",
        "lastChapter": "meta[property=og:novel:latest_chapter_name]@content",
        "name": ".details h2@text"
    },
    "ruleContent": {
        "content": "@js:\nvar src = String(result);\nvar doc = org.jsoup.Jsoup.parse(src);\n\nfunction decode(d) {\n    var scripts = d.select('script');\n    var s = '';\n    for (var i = 0; i < scripts.size(); i++) {\n        var data = scripts.get(i).data();\n        var m = data.match(\/qsbs\\.bb\\('([^']+)'\\)\/);\n        if (m) {\n                var bytes = Packages.java.util.Base64.getDecoder().decode(m[1]);\n                s += new Packages.java.lang.String(bytes, 'UTF-8');\n        }\n    }\nif(null == s || s==''){\nvar str=doc.select('div.info_dv1');\nvar pList=str.select('p');\ns=pList.toString();\n}\n    return s;\n}\nvar content = decode(doc);\n\nvar m = baseUrl.match(\/kuaishou\\\/(\\d+)\\\/(\\d+)(?:_\\d+)?\\.html\/);\nif (m) {\n    var bid = m[1];\n    var cid = m[2];\n    for (var p = 1; p < 50; p++) {\n            var url = 'https:\/\/www.huiysj.com\/kuaishou\/' + bid + '\/' + cid + '_' + p + '.html';\n            var html = String(java.ajax(url));\n            if (!html || html.indexOf('(第1页)') > 0) break;\n            var nextContent = decode(org.jsoup.Jsoup.parse(html));\n            if (!nextContent || nextContent === '') break;\n            content += nextContent;\n    }\n}\n\ncontent;",
        "replaceRegex": "##<p>.*?幻影小说.*?<\/p>|请关闭浏览器阅读模式.*|手机浏览器扫描.*##"
    },
    "ruleExplore": {
        "author": ".s4@text",
        "bookList": ".list_l2 li",
        "bookUrl": ".s2 a@href",
        "kind": ".s1@text",
        "lastChapter": ".s2 a@title##最新章节:",
        "name": ".s2 a@text"
    },
    "ruleSearch": {
        "author": ".s3 a@text",
        "bookList": "#novel-search li",
        "bookUrl": ".s2 a@href",
        "checkKeyWord": "我的",
        "kind": ".s1@text",
        "lastChapter": ".s4 a@text",
        "name": ".s2 a@text"
    },
    "ruleToc": {
        "chapterList": "@js:\nvar url='https:\/\/www.huiysj.com\/kuaishou\/';\nvar bookId = baseUrl.match(\/kuaishou\\\/(\\d+)\/)[1];\nvar list = new Packages.java.util.ArrayList();\nfirstPage();\notherPage();\n\nfunction firstPage() {\n    var doc = org.jsoup.Jsoup.parse(result.toString());\n    var sections = doc.select('div.info_dv3');\n    for (var s = 0; s < sections.size(); s++) {\n        var sec = sections.get(s);\n        var title = sec.select('div.title').text();\n        if (title.indexOf('\\u7ae0\\u8282\\u5217\\u8868') >= 0) {\n            var links = sec.select('a[href*=\/kuaishou\/]');\n            for (var i = 0; i < links.size(); i++) {\n                var a = links.get(i);\n                var name = a.text();\n                var hr = a.attr('abs:href');\n                if (name && hr && hr.indexOf('all_') < 0) {\n                    addChap(name, hr);\n                }\n            }\n        }\n    }\n}\n\nfunction otherPage() {\n    for (var p = 1; p < 100; p++) {\n        var pageUrl = url + bookId + '\/all_' + p + '\/index.html';\n        var html = String(java.ajax(pageUrl));\n        if (!html || html.indexOf('章节列表(第1页)') > 0) {\n            break;\n        }\n        var d2 = org.jsoup.Jsoup.parse(html);\n        var str = d2.select('style').toString();\n        var nthChildCount = (str.match(\/ul\\.yanqing_list>li:nth-child\\(\/g) || []).length;\n        var nthLastChildCount = (str.match(\/ul\\.yanqing_list>li:nth-last-child\\(\/g) || []).length;\n        var items = d2.select('ul.yanqing_list li a');\n        if (items.size() === 0) break;\n        for (var k = nthChildCount; k < items.size() - nthLastChildCount; k++) {\n            var a2 = items.get(k);\n            var name = a2.text();\n            var oc = a2.attr('onclick');\n            var m = oc.match(\/read_tz\\((\\d+)\\)\/);\n            if (m) {\n                addChap(name, url + bookId + '\/' + m[1] + '.html');\n            }\n        }\n    }\n}\n\nfunction addChap(name, url) {\n    if (url && url.indexOf('kuaishou') >= 0) {\n        var map = new Packages.java.util.HashMap();\n        map.put(\"name\", name);\n        map.put(\"url\", url);\n        list.add(map);\n    }\n}\n\nlist;",
        "chapterName": "$.name",
        "chapterUrl": "$.url"
    },
    "searchUrl": "https:\/\/www.huiysj.com\/search.html,{\"method\":\"POST\",\"body\":\"s={{key}}\",\"charset\":\"utf-8\"}",
    "weight": 0
}
广告