华人论坛(魔法)
http://www.huarenv5.com
天天的鸟蛋 (2333)02/11 06:50
by天天的鸟蛋蛋 2025/2/11 完善目录和正文 @= = 目录规则 原创作时间未知 原创者名未知 需要登录
{ "bookSourceComment": "by天天的鸟蛋蛋 2025\/2\/11 完善目录和正文\n@= = 目录规则\n原创作时间未知 原创者名未知\n\n需要登录", "bookSourceGroup": "", "bookSourceName": "华人论坛(魔法)", "bookSourceType": 0, "bookSourceUrl": "http:\/\/www.huarenv5.com", "bookUrlPattern": "", "customOrder": 6374, "enabled": true, "enabledCookieJar": true, "enabledExplore": true, "exploreUrl": "未来幻想::http:\/\/www.huarenv5.com\/forum\/forumdisplay.php?fid=54&filter=type&typeid=108", "header": "{\n \"User-Agent\": \"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/56.0.2924.87 Safari\/537.36\"\n}", "lastUpdateTime": "1739227802690", "loginUrl": "http:\/\/www.huarenv5.com\/forum\/logging.php?action=login", "respondTime": 180000, "ruleBookInfo": { "author": "[email protected]@ownText##.*作者:(.*)(.*##$1", "coverUrl": "class.lazy@data-original", "intro": "id.read_tpc@textNodes&&[email protected]@text##图片:.*|原文地址(.|\\n)*", "kind": "", "name": "tag.title@ownText##《(.*)》.*##$1", "tocUrl": "", "wordCount": "" }, "ruleContent": { "content": "<js>\nvar JsDom = Packages.org.jsoup.Jsoup;\nvar Document = Packages.org.jsoup.nodes.Document;\nvar Element = Packages.org.jsoup.nodes.Element;\nvar TextNode = Packages.org.jsoup.nodes.TextNode;\nvar Node = Packages.org.jsoup.nodes.Node;\n\n\nvar document = JsDom.parse(src);\n\nvar result = [];\n\nvar postList = document.select(\"#postlist > div\");\n\npostList.forEach(function(post) {\n \n var postId = post.id();\n\n \n var author = post.select(\".postinfo > a\").text();\n\n \n var time = post.select(\".authorinfo > em\").text();\n\n \n var contentElement = post.select(\".t_msgfont\").first(); \n if (contentElement) {\n \n contentElement.select(\"font, span\").remove();\n\n \n var contentNodes = contentElement.childNodes();\n var content = \"\";\n contentNodes.forEach(function(node) {\n if (node instanceof TextNode) {\n content += node.getWholeText() + \"\\n\"; \n } else if (node instanceof Element) {\n \n if (node.tagName().equals(\"br\")) {\n content += \"\\n\"; \n } else {\n content += node.text() + \"\\n\"; \n }\n }\n });\n } else {\n var content = \"\"; \n }\n\n \n var item = {\n \"data\": \"作者:\" + author + \" \" + time + \"\\n\" + content.trim(),\n \"id\": postId\n };\n\n \n result.push(item);\n});\n\n\nvar mergedData = result.map(item => item.data).join(\"\\n\\n\"); \n\nmergedData;\n<\/js>\n", "imageStyle": "", "nextContentUrl": "" }, "ruleExplore": { "author": "[email protected]@text##.*作者:(.*)(.*##$1", "bookList": "tag.tbody@tr", "bookUrl": "tag.a@href", "kind": "[email protected]@text#\\[(.*)\\]##$1", "name": "[email protected]@text##《(.*)》.*##$1", "wordCount": "" }, "ruleSearch": { "author": "[email protected]@text##.*作者.|\\【.*", "bookList": "[email protected]@tag.tbody", "bookUrl": "tag.a@href", "checkKeyWord": "http:\/\/www.huarenv5.com\/forum\/thread-351324-1-1.html", "coverUrl": "", "kind": "[email protected]@text##口-", "name": "[email protected]@text##\\《|\\》.*" }, "ruleToc": { "chapterList": "<js>\n\/\/获取总页数\ntry{\na=java.getString(\"@@.last.0@text\").match(\/\\s(\\d+)\/)[1];\n}catch{a=java.getElements(\".pages.0@a\").length;}\nlist=[];\nlist.push({text:\"第1页\",href:baseUrl});\nfor(i=2;i<=a;i++){\tlist.push({text:\"第\"+i+\"页\",href:baseUrl+\"&page=\"+i})\n\t}\nlist\n<\/js>", "chapterName": "text", "chapterUrl": "href", "formatJs": "", "nextTocUrl": "", "preUpdateJs": "" }, "searchUrl": "http:\/\/www.huarenv5.com\/forum\/search.php,{\n \"charset\": \"gbk\",\n \"method\": \"POST\",\n \"body\": \"srchtxt={{key}}&searchsubmit=true&orderway=lastpost&srchtype=title&sch_time=all\"\n}", "weight": 0 }