[{"bookSourceComment":"\/\/❗免责声明：  \n本工具\/代码\/内容仅供学习交流使用，严禁用于任何非法用途。使用者应严格遵守所在国家或地区的法律法规，任何因滥用或违规使用导致的后果均与开发者\/提供者无关，责任自负❗","bookSourceGroup":"🔞","bookSourceName":"夜读阁","bookSourceType":0,"bookSourceUrl":"https:\/\/www.yeduge.com","customOrder":19,"enabled":true,"enabledCookieJar":true,"enabledExplore":true,"exploreUrl":"@js:\nfunction getCategories() {\n    \/\/ 获取标签分类\n    let tagHtml = java.ajax(\"https:\/\/www.yeduge.com\/tags\/\");\n    let tagDoc = org.jsoup.Jsoup.parse(tagHtml);\n    let tagList = tagDoc.select(\".tag-list li a\");\n    \n    let tags = Array.from(tagList, (a) => ({\n        \"title\": a.ownText().trim(),\n        \"url\": a.attr(\"href\") + \"{{page}}.html\",\n        \"style\": {\n            \"layout_flexGrow\": 1,\n            \"layout_flexBasisPercent\": 0.25\n        }\n    }));\n\n    \/\/ 获取分类目录\n    let catHtml = java.ajax(\"https:\/\/www.yeduge.com\/categories\/\");\n    let catDoc = org.jsoup.Jsoup.parse(catHtml);\n    let catList = catDoc.select(\".category-list li a\");\n    \n    let categories = Array.from(catList, (a) => ({\n        \"title\": a.ownText().trim(),\n        \"url\": a.attr(\"href\") + \"?page={{page}}\",\n        \"style\": {\n            \"layout_flexGrow\": 1,\n            \"layout_flexBasisPercent\": 0.25\n        }\n    }));\n\n    \/\/ 添加完本小说和热门小说\n    let additionalCategories = [\n        {\n            \"title\": \"完本小说\",\n            \"url\": \"https:\/\/www.yeduge.com\/rank\/complete\/{{page}}.html\",\n            \"style\": {\n                \"layout_flexGrow\": 1,\n                \"layout_flexBasisPercent\": 0.25\n            }\n        },\n        {\n            \"title\": \"热门小说\",\n            \"url\": \"https:\/\/www.yeduge.com\/rank\/hot\/{{page}}.html\",\n            \"style\": {\n                \"layout_flexGrow\": 1,\n                \"layout_flexBasisPercent\": 0.25\n            }\n        }\n    ];\n\n    \/\/ 合并所有数组\n    let allCategories = tags.concat(categories, additionalCategories);\n    \n    return JSON.stringify(allCategories);\n}\n\n\/\/ 执行并返回结果\ngetCategories();","lastUpdateTime":"1756461670216","loginUi":"[\n    {\n    \t\"name\": \"账号\", \n    \t\"type\": \"text\"\n    \t},\n    {\n    \t\"name\": \"密码\", \n    \"type\": \"text\"\n    }\n]","loginUrl":"function login() {\n    try {\n        var url = baseUrl.replace(\/\\\/+$\/, '').replace(\/[^\\w.:\/-]\/g, '');\n        var ur = source.getLoginInfoMap();\n        var params = `username=${ur.get(\"账号\")}&password=${ur.get(\"密码\")}`;\n        var r = java.post(`${url}\/api\/login.php`, params, {\"method\": \"POST\"});\n\n        \/\/ 解析响应体\n        var resp = JSON.parse(r.body());\n        \n        \/\/ 处理登录结果\n        if (resp.success) {\n            const cookies = Array.from(r.cookies(), \n    ([k, v]) => `${k}=${v}`).join(';');\n            return source.putLoginHeader(JSON.stringify({Cookie: cookies}));\n        } else {\n            throw new Error(`登录失败: ${resp.message || '未知错误'}`);\n        }\n    } catch (e) {\n        java.log(`登录异常: ${e.message}\\n请求参数: ${params}`);\n        throw e;\n    }\n}","respondTime":180000,"ruleBookInfo":{"author":"p.0@text","coverUrl":".cover.0@img@src","intro":".desc@text","kind":"p.1@text&&p.2:3@a@text##状态：","name":"h1@text"},"ruleContent":{"content":".content@html"},"ruleExplore":{"author":"span.0@text","bookList":".novel-list@a","bookUrl":"a@href","coverUrl":"img.0@data-src","name":"h4.0@text"},"ruleSearch":{"author":"span@text","bookList":".novel-item","bookUrl":"a@href","coverUrl":"img@data-src","intro":"p@text","name":"a@text"},"ruleToc":{"chapterList":".chapter-list@a","chapterName":"text","chapterUrl":"href"},"searchUrl":"\/search\/?q={{key}}&page={{page}}","weight":0}]