🔞禁忌书屋 精华区
https://www.cool18.com/bbs4
chiayo (14261)1天前
cool18禁忌书屋 精华区的书源,需翻墙
提取规则不同,加上能力不够,没法跟主论坛书源做到一起,所以单独做了个精华区的源
跟论坛同步,总得来说还行!!
{
"bookSourceComment": "禁忌书屋精华区独立书源",
"bookSourceGroup": "论坛小说",
"bookSourceName": "🔞禁忌书屋 精华区",
"bookSourceType": 0,
"bookSourceUrl": "https:\/\/www.cool18.com\/bbs4",
"customOrder": 1,
"enabled": true,
"enabledCookieJar": true,
"enabledExplore": true,
"exploreUrl": "[{\"title\":\"⭐精华区\",\"url\":\"https:\/\/www.cool18.com\/bbs4\/index.php?app=forum&act=gold&p={{page}}\",\"style\":{\"layout_flexGrow\":1}}]",
"header": "[]",
"lastUpdateTime": "1784704089197",
"respondTime": 180000,
"ruleBookInfo": {},
"ruleContent": {
"content": "<js>\nvar document = org.jsoup.Jsoup.parse(result);\nvar preElements = document.select('div#content-section.content-section > pre');\nif (preElements.isEmpty()) {\n result = '未找到 div#content-section.content-section > pre 元素';\n} else {\n var preElement = preElements.first();\n preElement.select('b font[size=4]').remove();\n var innerHtml = preElement.html();\n function convertHtmlToPlainTextWithLineBreaks(html) {\n var text = html;\n text = text.replaceAll(\" \", \" \");\n text = text.replaceAll(\"(?i)<p[^>]*><\\\\\/p>\", \"\\n\");\n text = text.replaceAll(\"(?i)<p[^>]*>(.*?)<\\\\\/p>\", \"\\n$1\\n\");\n text = text.replaceAll(\"(?i)<br\\\\s*\\\\\/?>\", \"\\n\");\n text = text.replaceAll(\"<[^>]+>\", \"\");\n text = text.replaceAll(\"\\\\n{3,}\", \"\\n\\n\");\n return text.trim();\n }\n var plainText = convertHtmlToPlainTextWithLineBreaks(innerHtml);\n result = plainText;\n}\n<\/js>"
},
"ruleExplore": {},
"ruleSearch": {
"author": "a@text##^(.*?)(?:作者[:|:](.*))?$##$2",
"bookList": "ul.post-list > li.post-item",
"bookUrl": "a@href",
"name": "a@text##作者.*##"
},
"ruleToc": {
"chapterList": "<js>\nvar doc=org.jsoup.Jsoup.parse(result);\nvar links=doc.select('pre a[href*=\"threadview\"]');\nvar list=[];\nvar pdf=0;\nif(links.size()>0){\nvar firstNext=links.get(links.size()-1).text();\nvar nm=firstNext.match(\/([0-90-9]+)[-–—]\/);\nif(nm)pdf=parseInt(nm[1].replace(\/[0-9]\/g,function(c){return String.fromCharCode(c.charCodeAt(0)-0xFEE0)}))-1;\n}\nvar m=result.match(\/【[^】]+】\/);\nvar title=m?m[0]:'第1章';\nvar cn=pdf>0?title+'(1-'+pdf+')':title;\nvar selfA=doc.createElement('a');\nselfA.attr('href',baseUrl);\nselfA.text(cn);\nlist.push(selfA);\nfor(var i=links.size()-1;i>=0;i--){list.push(links.get(i))}\nresult=list\n<\/js>",
"chapterName": "text",
"chapterUrl": "href"
},
"searchUrl": "https:\/\/www.cool18.com\/bbs4\/index.php?app=forum&act=gold",
"weight": 0
}