✨ feat(bookSource): 重写聚合书源为朴素 URL 模式并支持四模式与段评
- 小说/听书/漫画/短剧四模式:登录表单与发现页筛选按钮双入口切换,支持 x/t/m/d: 搜索前缀 - 段评气泡:对接 /content?review=keep 注入的 <comment> 标记,点击打开 /review_html 评论页 - 正文分流:听书优先视频原声回退 TTS,短剧走解密代理直链,空正文回退漫画图片 - 跨规则状态改用相对 URL + java.put 传递,弃用 data:;base64 链(真实阅读端解码语义不符) - 临时走 http(服务器 443 证书未挂载,修复后可改回 https)
This commit is contained in:
1 parent
0aed60713a
commit
096f6c222d
1 file changed
+39
-35
+39
-35
@@ -1,45 +1,26 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"bookSourceComment": "fanqie-go 自建服务代理版 v1\n签名(Gorgon/Argus/Ladon)、设备注册、正文解密、缓存全部由服务端完成,本地零计算、零设备注册。\n接口:/search /detail /catalog /content /category-landing。\n正文参数固定 text_mode=plain&review_mode=remove,不依赖服务器配置。\n发现页:男频/女频 × 精选/标签 四组共 280 个入口(已剔除空分类与推荐流降级标签)。\n依赖服务器可用,服务失效则书源整体失效,无本地回退。",
|
"bookSourceComment": "fanqie-go 聚合书源:一个源覆盖 小说/听书/漫画/短剧。\n\n【设置入口】① 书源编辑 → 登录:填写表单后点底部「登录」保存;② 发现页顶部「模式」筛选按钮直接切换,切换后刷新发现页。\n【快捷搜索】搜索时可用前缀临时指定模式:x:小说(可省略)、t:听书、m:漫画、d:短剧,如「t:十日终焉」。\n【段评】正文气泡为段落评论,点击打开评论页(设置中段评=开)。\n【正文分流】听书:短剧视频章优先返回原声音轨,其余回退 TTS 音色;短剧:自动打开视频代理直链;小说/漫画:正文为空(漫画章)自动回退图片列表。\n【参数】音色 0/1/2/4/5/6(默认 0);清晰度仅视频生效(默认 max)。\n【依赖】全部计算由自建服务端完成,服务失效则书源整体失效。动态书籍类型需较新版本阅读。已在书架的书切换模式后需刷新目录。\n\n【当前走 http】服务器 443 的 fq 证书未挂载(两个 SNI 都返回 shuyuan 证书),修复后可把书源地址改回 https。",
|
||||||
"bookSourceGroup": "🍅 番茄",
|
"bookSourceGroup": "🍅 番茄",
|
||||||
"bookSourceName": "🍅 番茄小说",
|
"bookSourceName": "🍅 番茄聚合",
|
||||||
"bookSourceType": 0,
|
"bookSourceType": 0,
|
||||||
"bookSourceUrl": "https://fq.20010117.xyz",
|
"bookSourceUrl": "http://fq.20010117.xyz",
|
||||||
"customOrder": 0,
|
"customOrder": 0,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"enabledCookieJar": false,
|
"enabledCookieJar": false,
|
||||||
"enabledExplore": true,
|
"enabledExplore": true,
|
||||||
"header": "{\"User-Agent\": \"Mozilla/5.0 (Linux; Android 13; 2210132C Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.5845.92 Mobile Safari/537.36\"}",
|
"header": "{\"User-Agent\": \"Mozilla/5.0 (Linux; Android 13; 2210132C Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.5845.92 Mobile Safari/537.36\"}",
|
||||||
"lastUpdateTime": 1791554265601,
|
"jsLib": "// ============ 源变量配置(照光遇模式:defaultConfig 兜底,全 try-catch) ============\nconst defaultConfig = {\n 模式: \"小说\",\n 音色: \"0\",\n 清晰度: \"max\",\n 段评: \"开\",\n 图片: \"保留\"\n};\n\nfunction getVariable(k) {\n if (k == undefined) k = \"\";\n let parsed = {}\n try {\n parsed = JSON.parse(source.getVariable())\n } catch {}\n if (k == \"\") {\n return parsed;\n }\n let value = parsed[k];\n if (value == undefined) {\n value = defaultConfig[k];\n }\n return value != undefined ? value : \"\";\n}\n\nfunction setVariable(k, v, t) {\n if (t == undefined) t = true;\n const vs = this.getVariable();\n vs[k] = v;\n source.setVariable(JSON.stringify(vs, null, 4));\n if (t) {\n java.toast(`\\n设置 ${k} 为 ${v}`)\n }\n}\n\n// 发现页筛选按钮回调:存变量并刷新发现页\nfunction show(m, t) {\n let data = {};\n try {\n data = JSON.parse(source.getVariable())\n } catch {}\n data[t] = m;\n source.setVariable(JSON.stringify(data, null, 2));\n java.toast(`\\n已设置${t}:${m}\\n已在书架的书切换模式后需刷新目录`);\n try {\n java.refreshExplore();\n } catch {}\n}\n\nfunction createFilter(title, chars, defaultVal, paramKey, size, viewName) {\n if (viewName == undefined) viewName = \"'请选择类型'\";\n return {\n title: title,\n type: \"select\",\n chars: chars,\n default: defaultVal,\n \"viewName\": viewName,\n action: `show(infoMap['${title}'],'${paramKey}')`,\n style: {\n layout_flexGrow: 1,\n layout_flexBasisPercent: size\n }\n };\n}\n\n// ============ 基础工具 ============\nfunction BaseUrl() {\n return String(source.getKey()).replace(/\\/+$/, '');\n}\n\nfunction request(url) {\n let urla = url;\n if (!url.includes('http')) urla = this.BaseUrl() + url;\n return java.ajax(urla);\n}\n\nfunction parseJsonSafely(str, defaultValue) {\n if (defaultValue == null) defaultValue = null;\n try {\n return JSON.parse(str);\n } catch (e) {\n return defaultValue;\n }\n}\n\nfunction isIOS() {\n try {\n java.deviceID();\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction isMod() {\n try {\n if (typeof java.reLoginView == 'function') return true;\n new Packages.io.legato.kazusa.utils.TimeoutCancellationException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// ============ 段评气泡(/content?review=keep 注入 <comment> 标记,点击打开 /review_html 页面) ============\nfunction createSvg(number, url) {\n var t = number > 99 ? '99+' : String(number);\n var svg = `<svg xmlns='http://www.w3.org/2000/svg' width='100' height='90' viewBox='0 0 25 17' fill='none'><path stroke='currentColor' stroke-width='1.00' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='4.00' style='stroke:#A7A7A7;stroke-opacity:0.5;stroke-width:1px;stroke-linejoin:round;fill:transparent;fill-opacity:0.5;' d='M 7.5 0.5 L 16.5 0.5 A 7 7 0 0 1 23.5 7.5 L 23.5 7.5 A 7 7 0 0 1 16.5 14.5 L 8.5 14.5 L 5.192 16.5 L 5.5 14.5 A 7 7 30 0 1 0.5 7.5 L 0.5 7.5 A 7 7 0 0 1 7.5 0.5 Z'/><text fill='#A7A7A7' font-family='Arial, sans-serif' font-size='10' font-weight='500' text-anchor='middle' dy='0.35em' x='12.00' y='7.50'>${t}</text></svg>`;\n var k = isMod() ? 'click' : 'js';\n return `data:image/svg+xml;base64,${java.base64Encode(svg)},{\"${k}\":\"showCmt('${url}','段评')\",\"style\":\"text\"}`;\n}\n\nfunction showCmt(url, title) {\n var t = title || '段评';\n try {\n java.startBrowser(url, t);\n return;\n } catch (e) {}\n try {\n java.startBrowserDp(url, t);\n } catch (e2) {}\n}\n\nfunction paraForAndroid(content) {\n return content.replace(/<p\\b[^>]*>([\\s\\S]*?)(?:<comment ident=\"([^\"]*)\" count=\"([^\"]*)\" \\/>)?<\\/p>/g,\n function (m, text, url, count) {\n if (url && count) return `<p>${text}<img src=\"${createSvg(count, url)}\"></p>`;\n return `<p>${text}</p>`;\n });\n}\n\nfunction paraForiOS(content) {\n return content.replace(/<p\\b[^>]*>([\\s\\S]*?)(?:<comment ident=\"([^\"]*)\" count=\"([^\"]*)\" \\/>)?<\\/p>/g,\n function (m, text, url, count) {\n if (url && count) {\n var u = url.replace(/&/g, '&');\n return `<div rs-native>${text}<comment count=\"${count > 99 ? '99' : count}\" onPress=\"java.showReadingBrowser('${u}','段评')\"></div>`;\n }\n return `<div rs-native>${text}</div>`;\n }).replace(/"/g, '\"');\n}",
|
||||||
|
"loginUi": "[{\"name\": \"填写后点击底部「登录」保存设置\", \"type\": \"button\", \"action\": \"\"}, {\"name\": \"模式\", \"type\": \"option\", \"value\": \"小说\", \"options\": [\"小说\", \"听书\", \"漫画\", \"短剧\"]}, {\"name\": \"音色\", \"type\": \"option\", \"value\": \"0\", \"options\": [\"0\", \"1\", \"2\", \"4\", \"5\", \"6\"]}, {\"name\": \"清晰度\", \"type\": \"option\", \"value\": \"max\", \"options\": [\"max\", \"720p\", \"540p\", \"480p\", \"360p\"]}, {\"name\": \"段评\", \"type\": \"option\", \"value\": \"开\", \"options\": [\"开\", \"关\"]}, {\"name\": \"图片\", \"type\": \"option\", \"value\": \"保留\", \"options\": [\"保留\", \"移除\"]}]",
|
||||||
|
"loginUrl": "// 登录页即设置页:点「登录」提交表单后,表单值同步进源变量(顶层执行,确保有反馈)\n(function () {\n var li = {};\n try {\n li = JSON.parse(source.getLoginInfo());\n } catch (e) {}\n var names = ['模式', '音色', '清晰度', '段评', '图片'];\n for (var i = 0; i < names.length; i++) {\n var k = names[i];\n if (li[k] != undefined && li[k] != '') setVariable(k, li[k], false);\n }\n java.longToast('\\n✅ 设置已保存\\n模式:' + getVariable('模式') + '\\n音色:' + getVariable('音色') + '\\n清晰度:' + getVariable('清晰度') + '\\n段评:' + getVariable('段评') + '\\n图片:' + getVariable('图片') + '\\n\\n提示:已在书架的书切换模式后需刷新目录');\n})();\ntrue;",
|
||||||
|
"lastUpdateTime": 1791565772423,
|
||||||
"respondTime": 180000,
|
"respondTime": 180000,
|
||||||
"ruleBookInfo": {
|
"exploreUrl": "<js>\nvar groups = {\"🔥 男频精选\": [{\"title\": \"玄幻\", \"url\": \"/category-landing?category_id=7&offset={{(page-1)*20}}\"}, {\"title\": \"都市\", \"url\": \"/category-landing?category_id=1&offset={{(page-1)*20}}\"}, {\"title\": \"历史\", \"url\": \"/category-landing?category_id=12&offset={{(page-1)*20}}\"}, {\"title\": \"悬疑\", \"url\": \"/category-landing?category_id=10&offset={{(page-1)*20}}\"}, {\"title\": \"衍生\", \"url\": \"/category-landing?category_id=1079&offset={{(page-1)*20}}\"}, {\"title\": \"同人\", \"url\": \"/category-landing?category_id=538&offset={{(page-1)*20}}\"}, {\"title\": \"科幻末世\", \"url\": \"/category-landing?category_id=8&offset={{(page-1)*20}}\"}, {\"title\": \"奇幻仙侠\", \"url\": \"/category-landing?category_id=259&offset={{(page-1)*20}}\"}, {\"title\": \"种田\", \"url\": \"/category-landing?category_id=23&offset={{(page-1)*20}}\"}, {\"title\": \"游戏体育\", \"url\": \"/category-landing?category_id=746&offset={{(page-1)*20}}\"}, {\"title\": \"系统\", \"url\": \"/category-landing?category_id=19&offset={{(page-1)*20}}\"}, {\"title\": \"重生\", \"url\": \"/category-landing?category_id=36&offset={{(page-1)*20}}\"}, {\"title\": \"穿越\", \"url\": \"/category-landing?category_id=37&offset={{(page-1)*20}}\"}, {\"title\": \"多女主\", \"url\": \"/category-landing?category_id=91&offset={{(page-1)*20}}\"}, {\"title\": \"修仙\", \"url\": \"/category-landing?category_id=517&offset={{(page-1)*20}}\"}, {\"title\": \"二次元\", \"url\": \"/category-landing?category_id=39&offset={{(page-1)*20}}\"}, {\"title\": \"搞笑轻松\", \"url\": \"/category-landing?category_id=778&offset={{(page-1)*20}}\"}, {\"title\": \"单女主\", \"url\": \"/category-landing?category_id=389&offset={{(page-1)*20}}\"}, {\"title\": \"悬疑灵异\", \"url\": \"/category-landing?category_id=751&offset={{(page-1)*20}}\"}, {\"title\": \"末日求生\", \"url\": \"/category-landing?category_id=515&offset={{(page-1)*20}}\"}, {\"title\": \"娱乐圈\", \"url\": \"/category-landing?category_id=43&offset={{(page-1)*20}}\"}, {\"title\": \"末世\", \"url\": \"/category-landing?category_id=68&offset={{(page-1)*20}}\"}], \"🌸 女频精选\": [{\"title\": \"现代言情\", \"url\": \"/category-landing?category_id=3&offset={{(page-1)*20}}\"}, {\"title\": \"古代言情\", \"url\": \"/category-landing?category_id=5&offset={{(page-1)*20}}\"}, {\"title\": \"纯爱\", \"url\": \"/category-landing?category_id=1012&offset={{(page-1)*20}}\"}, {\"title\": \"甜宠\", \"url\": \"/category-landing?category_id=96&offset={{(page-1)*20}}\"}, {\"title\": \"总裁\", \"url\": \"/category-landing?category_id=29&offset={{(page-1)*20}}\"}, {\"title\": \"幻想言情\", \"url\": \"/category-landing?category_id=32&offset={{(page-1)*20}}\"}, {\"title\": \"双男主\", \"url\": \"/category-landing?category_id=275&offset={{(page-1)*20}}\"}, {\"title\": \"双女主\", \"url\": \"/category-landing?category_id=704&offset={{(page-1)*20}}\"}, {\"title\": \"年代\", \"url\": \"/category-landing?category_id=79&offset={{(page-1)*20}}\"}, {\"title\": \"快穿\", \"url\": \"/category-landing?category_id=24&offset={{(page-1)*20}}\"}, {\"title\": \"豪门总裁\", \"url\": \"/category-landing?category_id=748&offset={{(page-1)*20}}\"}, {\"title\": \"追妻火葬场\", \"url\": \"/category-landing?category_id=616&offset={{(page-1)*20}}\"}, {\"title\": \"无CP\", \"url\": \"/category-landing?category_id=392&offset={{(page-1)*20}}\"}, {\"title\": \"大女主\", \"url\": \"/category-landing?category_id=760&offset={{(page-1)*20}}\"}, {\"title\": \"女强\", \"url\": \"/category-landing?category_id=86&offset={{(page-1)*20}}\"}], \"🏷️ 男频标签\": [{\"title\": \"古代\", \"url\": \"/category-landing?category_id=758&offset={{(page-1)*20}}\"}, {\"title\": \"历史古代\", \"url\": \"/category-landing?category_id=273&offset={{(page-1)*20}}\"}, {\"title\": \"轻小说\", \"url\": \"/category-landing?category_id=858&offset={{(page-1)*20}}\"}, {\"title\": \"都市生活\", \"url\": \"/category-landing?category_id=2&offset={{(page-1)*20}}\"}, {\"title\": \"都市高武\", \"url\": \"/category-landing?category_id=1014&offset={{(page-1)*20}}\"}, {\"title\": \"游戏动漫\", \"url\": \"/category-landing?category_id=57&offset={{(page-1)*20}}\"}, {\"title\": \"抗战谍战\", \"url\": \"/category-landing?category_id=504&offset={{(page-1)*20}}\"}, {\"title\": \"体育\", \"url\": \"/category-landing?category_id=15&offset={{(page-1)*20}}\"}, {\"title\": \"都市异能\", \"url\": \"/category-landing?category_id=516&offset={{(page-1)*20}}\"}, {\"title\": \"武侠\", \"url\": \"/category-landing?category_id=16&offset={{(page-1)*20}}\"}, {\"title\": \"东方仙侠\", \"url\": \"/category-landing?category_id=1140&offset={{(page-1)*20}}\"}, {\"title\": \"东方玄幻\", \"url\": \"/category-landing?category_id=511&offset={{(page-1)*20}}\"}, {\"title\": \"男频衍生\", \"url\": \"/category-landing?categorLine truncated
|
||||||
"author": "$.data.author",
|
"searchUrl": "<js>\nvar tab = getVariable('模式');\nvar m = String(key).match(/^([xtmdXTMD])[:::]/);\nvar q = String(key);\nif (m) {\n tab = {x: '小说', t: '听书', m: '漫画', d: '短剧'}[m[1].toLowerCase()];\n q = q.slice(2);\n}\njava.put('fq_search_tab', tab);\nvar typeMap = {'小说': 3, '听书': 2, '漫画': 8, '短剧': 11};\n`/search?query=${encodeURIComponent(q)}&tab_type=${typeMap[tab] || 3}&offset=${(page - 1) * 10}`;\n</js>",
|
||||||
"coverUrl": "$.data.thumb_url",
|
|
||||||
"init": "",
|
|
||||||
"intro": "$.data.abstract",
|
|
||||||
"kind": "$.data.category_v2[*].Name",
|
|
||||||
"lastChapter": "$.data.last_chapter_title",
|
|
||||||
"name": "$.data.book_name",
|
|
||||||
"tocUrl": "/catalog?book_id={{$.data.book_id}}",
|
|
||||||
"wordCount": "$.data.word_number"
|
|
||||||
},
|
|
||||||
"ruleContent": {
|
|
||||||
"content": "$.data.content"
|
|
||||||
},
|
|
||||||
"ruleExplore": {
|
|
||||||
"author": "author",
|
|
||||||
"bookList": "$.data.book_info[*]",
|
|
||||||
"bookUrl": "/detail?book_id={{$.book_id}}",
|
|
||||||
"coverUrl": "thumb_url",
|
|
||||||
"intro": "abstract",
|
|
||||||
"kind": "category",
|
|
||||||
"name": "book_name",
|
|
||||||
"wordCount": "word_number"
|
|
||||||
},
|
|
||||||
"ruleSearch": {
|
"ruleSearch": {
|
||||||
"author": "author",
|
"author": "author",
|
||||||
"bookList": "$.data[*].book_data[*]",
|
"bookList": "<js>\nvar tab = java.get('fq_search_tab') || getVariable('模式');\nvar d = parseJsonSafely(result, {});\nvar list = [];\n(d.data || []).forEach(function (b) {\n (b.book_data || b.video_data || []).forEach(function (x) {\n x.fq_tab = tab;\n list.push(x);\n });\n});\nJSON.stringify({data: list});\n</js>$.data",
|
||||||
"bookUrl": "/detail?book_id={{$.book_id}}",
|
"bookUrl": "<js>\n'/detail?book_id=' + result.book_id + '&tab=' + (result.fq_tab || getVariable('模式'));\n</js>",
|
||||||
"checkKeyWord": "十日终焉",
|
"checkKeyWord": "十日终焉",
|
||||||
"coverUrl": "thumb_url",
|
"coverUrl": "thumb_url",
|
||||||
"intro": "abstract",
|
"intro": "abstract",
|
||||||
@@ -47,13 +28,36 @@
|
|||||||
"name": "book_name",
|
"name": "book_name",
|
||||||
"wordCount": "word_number"
|
"wordCount": "word_number"
|
||||||
},
|
},
|
||||||
|
"ruleExplore": {
|
||||||
|
"author": "author",
|
||||||
|
"bookList": "$.data.book_info[*]",
|
||||||
|
"bookUrl": "<js>\n'/detail?book_id=' + result.book_id + '&tab=' + (result.fq_tab || getVariable('模式'));\n</js>",
|
||||||
|
"coverUrl": "thumb_url",
|
||||||
|
"intro": "abstract",
|
||||||
|
"kind": "category",
|
||||||
|
"name": "book_name",
|
||||||
|
"wordCount": "word_number"
|
||||||
|
},
|
||||||
|
"ruleBookInfo": {
|
||||||
|
"author": "$.data.author",
|
||||||
|
"canReName": "1",
|
||||||
|
"coverUrl": "$.data.thumb_url",
|
||||||
|
"init": "<js>\njava.put('fq_tab', (String(baseUrl).match(/[?&]tab=([^&]+)/) || [])[1] || getVariable('模式'));\nresult;\n</js>",
|
||||||
|
"intro": "<js>\nvar tab = java.get('fq_tab') || getVariable('模式');\nvar x = (parseJsonSafely(result, {}) || {}).data || {};\nfunction v(t) { return (t != undefined && t != null && String(t).length > 0 && String(t) != 'null') ? String(t) : ''; }\nfunction cats() {\n if (x.category) return x.category;\n if (Array.isArray(x.category_v2)) return x.category_v2.map(function (c) { return c.Name || c.name || ''; }).filter(String).join('/');\n return '';\n}\nvar statusMap = {'0': '连载中', '1': '连载中', '2': '已完结', 'creation_status_end': '已完结', 'creation_status_loading': '连载中'};\nvar st = statusMap[v(x.creation_status)] || v(x.creation_status);\nvar lines = ['📡 来源:番茄 | 🔄 模式:' + tab];\n[['🌈 分类', cats()],\n ['📚 最新章节', v(x.last_chapter_title)],\n ['📝 字数', v(x.word_number)],\n ['🚩 状态', st],\n ['⭐ 评分', v(x.score)],\n ['👀 阅读人数', v(x.read_count)]\n].forEach(function (p) { if (p[1]) lines.push(' ' + p[0] + ':' + p[1]); });\nif (v(x.abstract)) lines.push('❇️─────────\\n📖 简介:\\n' + String(x.abstract).split('\\n').map(function (l) { return ' ' + l; }).join('\\n'));\nlines.join('\\n');\n</js>",
|
||||||
|
"kind": "$.data.category_v2[*].Name",
|
||||||
|
"lastChapter": "$.data.last_chapter_title",
|
||||||
|
"name": "$.data.book_name",
|
||||||
|
"tocUrl": "/catalog?book_id={{$.data.book_id}}",
|
||||||
|
"wordCount": "$.data.word_number"
|
||||||
|
},
|
||||||
"ruleToc": {
|
"ruleToc": {
|
||||||
"chapterList": "$.data.item_data_list[*]",
|
"chapterList": "<js>\njava.put('fq_book_id', (String(baseUrl).match(/book_id=(\\d+)/) || [])[1] || '');\n// 书籍类型按模式动态设置:安卓 8文本/32音频/64图片,iOS 0/1/2\nvar tab = java.get('fq_tab') || getVariable('模式');\nvar tMap = {'小说': 8, '听书': 32, '漫画': 64, '短剧': 8};\nvar t = tMap[tab] || 8;\nif (isIOS()) t = {'小说': 0, '听书': 1, '漫画': 2, '短剧': 0}[tab] || 0;\ntry { book.type = t; } catch (e) {}\nresult;\n</js>$.data.item_data_list[*]",
|
||||||
"chapterName": "title",
|
"chapterName": "$.title",
|
||||||
"chapterUrl": "/content?item_id={{$.item_id}}&text_mode=plain&review_mode=remove"
|
"chapterUrl": "<js>\nvar tab = java.get('fq_tab') || getVariable('模式');\nvar id = result.item_id;\nvar url;\nif (tab == '听书') {\n url = '/audio?item_ids=' + id + '&tone_id=' + getVariable('音色') + '&output=url';\n} else if (tab == '短剧') {\n url = '/video?item_ids=' + id + '&output=proxy&quality=' + getVariable('清晰度');\n} else {\n var review = getVariable('段评') != '关' ? 'keep' : 'remove';\n var img = getVariable('图片') == '移除' ? 'remove' : 'keep';\n url = '/content?item_id=' + id + '&text_mode=' + (review == 'keep' ? 'html' : 'plain') + '&review=' + review + '&image_mode=' + img;\n}\nurl;\n</js>"
|
||||||
|
},
|
||||||
|
"ruleContent": {
|
||||||
|
"content": "<js>\nvar base = BaseUrl();\nvar u = String(baseUrl);\nvar item = (u.match(/item_ids?=(\\d+)/) || [])[1] || '';\nvar tab = java.get('fq_tab') || getVariable('模式');\nfunction absUrl(s) { return (s && String(s).indexOf('http') != 0) ? base + s : s; }\nfunction videoUrl() {\n var v = parseJsonSafely(request('/video?item_ids=' + item + '&output=proxy&quality=' + getVariable('清晰度')), null);\n var vl = v && v.data && v.data.video_list;\n if (vl) { var ks = Object.keys(vl); if (ks.length) return absUrl(vl[ks[0]].main_url); }\n return '';\n}\nvar out = '';\nif (u.indexOf('/video') > -1) {\n // 短剧:解密代理直链,当前章节自动打开播放\n var d = parseJsonSafely(result, {});\n var vl = d.data && d.data.video_list;\n var vu = '';\n if (vl) { var ks = Object.keys(vl); if (ks.length) vu = absUrl(vl[ks[0]].main_url); }\n if (vu && book.durChapterIndex == chapter.index) {\n try { java.startBrowser(vu, title || ''); } catch (e) {}\n }\n out = vu ? `▶️ 正在加载视频…\\n若未自动播放,请复制以下直链到播放器打开:\\n${vu}` : '❌ 视频获取失败,请刷新重试';\n} else if (u.indexOf('/audio') > -1) {\n // 听书:短剧视频章优先原声音轨,其余回退 TTS 音色\n out = videoUrl();\n if (!out) {\n var a = parseJsonSafely(result, {});\n if (a.data && a.data[0] && a.data[0].main_url) out = absUrl(a.data[0].main_url);\n }\n} else {\n // 小说/漫画:段评气泡 + 空正文回退图片列表\n var review = getVariable('段评') != '关';\n var c = '';\n var d = parseJsonSafely(result, {});\n c = (d.data && d.data.content) || '';\n if (c && review) {\n // 段评 ident 域名由服务端按请求 Host 拼接,强制替换为书源地址\n c = c.replace(/(<comment ident=\")[^\"]*?\\/review_html\\?/g, '$1' + base + '/review_html?');\n c = isIOS() ? paraForiOS(c) : paraForAndroid(c);\n }\n if (c) {\n out = c;\n } else {\n var m = parseJsonSafely(request('/manga?item_ids=' + item + '&output=proxy'), {});\n out = (m && Array.isArray(m.data)) ? m.data.map(function (i) { return `<img src=\"${absUrl(i.data)}\">`; }).join('\\n') : ((m && m.data && m.data.content) || '❌ 内容获取失败,请刷新重试');\n }\n}\nout;\n</js>"
|
||||||
},
|
},
|
||||||
"exploreUrl": "{\"🔥 男频精选\": [\"玄幻::/category-landing?category_id=7&offset={{(page-1)*20}}\", \"都市::/category-landing?category_id=1&offset={{(page-1)*20}}\", \"历史::/category-landing?category_id=12&offset={{(page-1)*20}}\", \"悬疑::/category-landing?category_id=10&offset={{(page-1)*20}}\", \"衍生::/category-landing?category_id=1079&offset={{(page-1)*20}}\", \"同人::/category-landing?category_id=538&offset={{(page-1)*20}}\", \"科幻末世::/category-landing?category_id=8&offset={{(page-1)*20}}\", \"奇幻仙侠::/category-landing?category_id=259&offset={{(page-1)*20}}\", \"种田::/category-landing?category_id=23&offset={{(page-1)*20}}\", \"游戏体育::/category-landing?category_id=746&offset={{(page-1)*20}}\", \"系统::/category-landing?category_id=19&offset={{(page-1)*20}}\", \"重生::/category-landing?category_id=36&offset={{(page-1)*20}}\", \"穿越::/category-landing?category_id=37&offset={{(page-1)*20}}\", \"多女主::/category-landing?category_id=91&offset={{(page-1)*20}}\", \"修仙::/category-landing?category_id=517&offset={{(page-1)*20}}\", \"二次元::/category-landing?category_id=39&offset={{(page-1)*20}}\", \"搞笑轻松::/category-landing?category_id=778&offset={{(page-1)*20}}\", \"单女主::/category-landing?category_id=389&offset={{(page-1)*20}}\", \"悬疑灵异::/category-landing?category_id=751&offset={{(page-1)*20}}\", \"末日求生::/category-landing?category_id=515&offset={{(page-1)*20}}\", \"娱乐圈::/category-landing?category_id=43&offset={{(page-1)*20}}\", \"末世::/category-landing?category_id=68&offset={{(page-1)*20}}\"], \"🌸 女频精选\": [\"现代言情::/category-landing?category_id=3&offset={{(page-1)*20}}\", \"古代言情::/category-landing?category_id=5&offset={{(page-1)*20}}\", \"纯爱::/category-landing?category_id=1012&offset={{(page-1)*20}}\", \"甜宠::/category-landing?category_id=96&offset={{(page-1)*20}}\", \"总裁::/category-landing?category_id=29&offset={{(page-1)*20}}\", \"幻想言情::/category-landing?category_id=32&offset={{(page-1)*20}}\", \"双男主::/category-landing?category_id=275&offset={{(page-1)*20}}\", \"双女主::/category-landing?category_id=704&offset={{(page-1)*20}}\", \"年代::/category-landing?category_id=79&offset={{(page-1)*20}}\", \"快穿::/category-landing?category_id=24&offset={{(page-1)*20}}\", \"豪门总裁::/category-landing?category_id=748&offset={{(page-1)*20}}\", \"追妻火葬场::/category-landing?category_id=616&offset={{(page-1)*20}}\", \"无CP::/category-landing?category_id=392&offset={{(page-1)*20}}\", \"大女主::/category-landing?category_id=760&offset={{(page-1)*20}}\", \"女强::/category-landing?category_id=86&offset={{(page-1)*20}}\"], \"🏷️ 男频标签\": [\"古代::/category-landing?category_id=758&offset={{(page-1)*20}}\", \"历史古代::/category-landing?category_id=273&offset={{(page-1)*20}}\", \"轻小说::/category-landing?category_id=858&offset={{(page-1)*20}}\", \"都市生活::/category-landing?category_id=2&offset={{(page-1)*20}}\", \"都市高武::/category-landing?category_id=1014&offset={{(page-1)*20}}\", \"游戏动漫::/category-landing?category_id=57&offset={{(page-1)*20}}\", \"抗战谍战::/category-landing?category_id=504&offset={{(page-1)*20}}\", \"体育::/category-landing?category_id=15&offset={{(page-1)*20}}\", \"都市异能::/category-landing?category_id=516&offset={{(page-1)*20}}\", \"武侠::/category-landing?category_id=16&offset={{(page-1)*20}}\", \"东方仙侠::/category-landing?category_id=1140&offset={{(page-1)*20}}\", \"东方玄幻::/category-landing?category_id=511&offset={{(page-1)*20}}\", \"男频衍生::/category-landing?category_id=1016&offset={{(page-1)*20}}\", \"西方奇幻::/category-landing?category_id=1141&offset={{(page-1)*20}}\", \"异世大陆::/category-landing?category_id=512&offset={{(page-1)*20}}\", \"都市种田::/category-landing?category_id=263&offset={{(page-1)*20}}\", \"影视小说::/category-landing?category_id=45&offset={{(page-1)*20}}\", \"仕途::/category-landing?category_id=558&offset={{(page-1)*20}}\", \"规则怪谈::/category-landing?category_id=851&offset={{(page-1)*20}}\", \"国运::/category-landing?category_id=496&offset={{(page-1)*20}}\", \"灵气复苏::/category-landing?category_id=514&offset={{(page-1)*20}}\", \"历史脑洞::/category-landing?category_id=272&offset={{(page-1)*20}}\", \"都市脑洞::/category-landing?category_id=262&offset={{(page-1)*20}}\", \"玄幻脑洞::/category-landing?category_id=257&offset={{(page-1)*20}}\", \"综漫::/category-landing?category_id=465&offset={{(page-1)*20}}\", \"综影视::/category-landing?category_id=1058&offset={{(page-1)*20}}\", \"架空::/category-landing?category_id=452&offset={{(page-1)*20}}\", \"异能::/category-landing?category_id=598&offset={{(page-1)*20}}\", \"克苏鲁::/category-landing?category_id=705&offset={{(page-1)*20}}\", \"高武世界::/category-landing?category_id=513&offset={{(page-1)*20}}\", \"悬疑脑洞::/categoryLine truncated
|
|
||||||
"searchUrl": "/search?query={{key}}&tab_type=3&offset={{(page-1)*10}}",
|
|
||||||
"weight": 0
|
"weight": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in new issue
Block a user