[
{
"bookSourceComment": "Linpx 书源(单篇)(更新📆:2025-02-15)\n\n可用功能:✅搜索✅发现✅添加网址✅订阅源 \n搜索小说:✅单篇❌系列✅作者✅标签✅链接 \n发现小说:✅推荐作者✅最近更新 \n添加网址:✅Linpx 链接✅Linpx 分享链接 \n搜索网址:✅Linpx 链接✅Pixiv 原文链接 \n订阅用法:点击订阅源打开小说,点击【添加到书架】按钮添加小说到书架 \n温馨提示:⚠️Linpx 搜索暂时不支持系列小说名称,添加系列小说后,无法再次通过搜索获取并更新目录\n\n书源发布:兽人阅读频道 https://t.me/FurryReading \n项目地址:https://github.com/windyhusky/PixivSource \n使用教程:https://github.com/windyhusky/PixivSource/blob/main/doc/Linpx.md\n\n规则订阅:Import 订阅源\nhttps://cdn.jsdelivr.net/gh/windyhusky/PixivSource@main/import.json\nhttps://raw.githubusercontent.com/windyhusky/PixivSource/main/import.json\n\n⚙️ 书源设置:\n书源管理 - 编辑书源 - 基本 - 变量说明 - 修改并保存",
"bookSourceGroup": "🔞 Pixiv",
"bookSourceName": "Linpx",
"bookSourceType": 0,
"bookSourceUrl": "https://furrynovel.ink",
"bookUrlPattern": ".*(https?://)?(api\\.|www\\.)?(furrynovel\\.(ink|xyz))/(pn|pixiv/novel)/\\d+(/cache)?.*",
"customOrder": 2,
"enabled": true,
"enabledCookieJar": false,
"enabledExplore": true,
"exploreUrl": "@js:\nli = [\n {\"推荐作者\": \"https://api.furrynovel.ink/fav/user/cache\"},\n {\"最新小说\": \"https://api.furrynovel.ink/pixiv/novels/recent/cache?page={{page}}\"}\n]\n\n// 格式化发现地址\nli.forEach(item => {\n item.title = Object.keys(item)[0]\n item.url = Object.values(item)[0]\n delete item[Object.keys(item)[0]]\n item.style = {}\n item.style.layout_flexGrow = 1\n item.style.layout_flexBasisPercent = 0.15\n})\nJSON.stringify(li)",
"header": "{\"referer\":\"https://furrynovel.ink/\"}",
"lastUpdateTime": 1739548800251,
"loginCheckJs": "var util = {}\n\nfunction objStringify(obj) {\n return JSON.stringify(obj, (n, v) => {\n if (typeof v == \"function\")\n return v.toString();\n return v;\n });\n}\n\nfunction publicFunc() {\n let u = {}, settings = {}\n java.log(String(source.bookSourceComment).split(\"\\n\")[0]) // 输出书源信息\n java.log(`手动更新时间:${java.timeFormat(source.lastUpdateTime)}`) // 输出书源信息\n settings = JSON.parse(String(source.variableComment).match(RegExp(/{([\\s\\S]*?)}/gm)))\n if (settings !== null) {\n java.log(\"⚙️ 使用自定义设置\")\n } else {\n settings = {}\n settings.SHOW_ORIGINAL_NOVEL_LINK = true\n settings.REPLACE_BOOK_TITLE_MARKS = true\n settings.MORE_INFO_IN_DESCRIPTION = false\n settings.SHOW_NOVEL_CAPTIONS = true\n settings.SHOW_NOVEL_COMMENTS = true\n settings.DEBUG = false\n java.log(\"⚙️ 使用默认设置(无自定义设置 或 自定义设置有误)\")\n }\n u.SHOW_ORIGINAL_NOVEL_LINK = settings.SHOW_ORIGINAL_NOVEL_LINK // 目录处显示小说源链接,但会增加请求次数\n u.REPLACE_BOOK_TITLE_MARKS = settings.REPLACE_BOOK_TITLE_MARKS // 注音内容为汉字时,替换为书名号\n u.MORE_INFO_IN_DESCRIPTION = settings.MORE_INFO_IN_DESCRIPTION // 书籍简介显示更多信息\n u.SHOW_NOVEL_CAPTIONS = settings.SHOW_NOVEL_CAPTIONS // 书籍简介显示更多信息\n u.SHOW_NOVEL_COMMENTS = settings.SHOW_NOVEL_COMMENTS // 书籍简介显示更多信息\n u.DEBUG = settings.DEBUG // 调试模式\n\n if (u.DEBUG === true) {\n java.log(JSON.stringify(settings, null, 4))\n java.log(`DEBUG = ${u.DEBUG}`)\n }\n\n\n u.debugFunc = (func) => {\n if (util.DEBUG) {\n func()\n }\n }\n u.cacheGetAndSet = (key, supplyFunc) => {\n let v = cache.get(key)\n if (v === undefined || v === null) {\n v = JSON.stringify(supplyFunc())\n // 缓存10分钟\n cache.put(key, v, 600)\n }\n return JSON.parse(v)\n }\n u.getAjaxJson = (url) => {\n return util.cacheGetAndSet(url, () => {\n return JSON.parse(java.ajax(url))\n })\n }\n u.getWebviewJson = (url) => {\n return util.cacheGetAndSet(url, () => {\n let html = java.webView(null, url, null)\n return JSON.parse((html.match(new RegExp(\">\\\\[{.*?}]<\"))[0].replace(\">\", \"\").replace(\"<\", \"\")))\n })\n }\n\n u.urlNovelUrl = (novelId) => {\n return `https://furrynovel.ink/pixiv/novel/${novelId}/cache`\n }\n u.urlNovelDetailed = (novelId) => {\n return `https://api.furrynovel.ink/pixiv/novel/${novelId}/cache`\n }\n u.urlNovelsDetailed = (nidList) => {\n return `https://api.furrynovel.ink/pixiv/novels/cache?${nidList.map(v => \"ids[]=\" + v).join(\"&\")}`\n }\n u.urlNovelComments = (novelId) => {\n return `https://api.furrynovel.ink/pixiv/novel/${novelId}/comments`\n }\n u.urlNovel = (novelId) => {\n if (util.SHOW_ORIGINAL_NOVEL_LINK) {\n return util.urlNovelUrl(novelId)\n } else {\n return util.urlNovelDetailed(novelId)\n }\n }\n\n // u.urlSeriesUrl = function (id) {\n // return `https://furrynovel.ink/pixiv/series/${id}/cache`\n // }\n u.urlSeriesUrl = (seriesId) => {\n return `https://www.pixiv.net/novel/series/${seriesId}`\n }\n u.urlSeriesDetailed = (seriesId) => {\n return `https://api.furrynovel.ink/pixiv/series/${seriesId}/cache`\n }\n u.urlSeries = (seriesId) => {\n if (util.SHOW_ORIGINAL_NOVEL_LINK) {\n return util.urlSeriesUrl(seriesId)\n } else {\n return util.urlSeriesDetailed(seriesId)\n }\n }\n\n u.urlUserUrl = (userId) => {\n return `https://furrynovel.ink/pixiv/user/${userId}/cache`\n }\n u.urlUserDetailed = (userId) => {\n return `https://api.furrynovel.ink/pixiv/user/${userId}/cache`\n }\n u.urlUsersDetailed = (uidList) => {\n return `https://api.furrynovel.ink/pixiv/users/cache?${uidList.map(v => \"ids[]=\" + v).join(\"&\")}`\n }\n\n u.urlSearchNovel = (novelName) => {\n return `https://api.furrynovel.ink/pixiv/search/novel/${novelName}/cache`\n }\n u.urlSearchUsers = (userName) => {\n return `https://api.furrynovel.ink/pixiv/search/user/${userName}/cache`\n }\n\n u.urlCoverUrl = (pxImgUrl) => {\n return `https://pximg.furrynovel.ink/?url=${pxImgUrl}&w=800`\n }\n // u.urlIllustUrl = function (illustId) {\n // return `https://www.pixiv.net/artworks/${illustId}`\n // }\n u.urlIllustOriginal = (illustId, order) => {\n // 使用 pixiv.cat 获取插图\n let illustOriginal = `https://pixiv.re/${illustId}.png`\n // let illustOriginal = `https://pixiv.nl/${illustId}.png`\n if (order >= 1) {\n illustOriginal = `https://pixiv.re/${illustId}-${order}.png`\n // illustOriginal = `https://pixiv.nl/${illustId}-${order}.png`\n }\n return illustOriginal\n }\n\n // 将多个长篇小说解析为一本书\n u.combineNovels = function(novels) {\n return novels.filter(novel => {\n // 单本直接解析为一本书,需要判断是否为 null\n if (novel.seriesId === undefined || novel.seriesId === null) {\n return true\n }\n //集合中没有该系列解析为一本书\n if (!seriesSet.has(novel.seriesId)) {\n seriesSet.add(novel.seriesId)\n return true\n }\n return false\n })\n }\n\n // 处理 novels 列表\n u.handNovels = function (novels){\n novels.forEach(novel => {\n if (novel.tags === undefined) {\n novel.tags = []\n }\n // novel.id = novel.id\n // novel.title = novel.title\n // novel.userName = novel.userName\n if (novel.seriesId === undefined || novel.seriesId === null) {\n // novel.tags = novel.tags\n novel.tags.unshift(\"单本\")\n novel.textCount = novel.length\n novel.latestChapter = novel.title\n novel.description = novel.desc\n // novel.coverUrl = novel.coverUrl\n novel.detailedUrl = util.urlNovel(novel.id)\n\n } else {\n java.log(`正在获取系列小说:${novel.seriesId}`)\n let series = util.getAjaxJson(util.urlSeriesDetailed(novel.seriesId))\n novel.id = series.novels[0].id\n novel.title = novel.seriesTitle\n novel.tags = series.tags\n // novel.tags = novel.tags.concat(series.tags)\n novel.tags = novel.tags.concat(series.novels[0].tags)\n novel.tags.unshift(\"长篇\")\n novel.tags = Array.from(new Set(novel.tags))\n novel.textCount = null // 无数据\n novel.createDate = null // 无数据\n novel.latestChapter = series.novels[series.novels.length-1].title\n novel.description = series.caption\n // 后端目前没有系列的 coverUrl 字段\n // novel.coverUrl = series.coverUrl\n novel.coverUrl = series.novels[0].coverUrl\n novel.detailedUrl = util.urlNovel(novel.id)\n // novel.detailedUrl = util.urlSeries(novel.id)\n\n if (series.caption === \"\") {\n let firstNovel = util.getAjaxJson(util.urlNovelDetailed(novel.id))\n novel.createDate = firstNovel.createDate\n if (firstNovel.length > 0) {\n novel.description = firstNovel[0].desc\n } else {\n novel.description = \"该小说可能部分章节因为权限或者被删除无法查看\"\n }\n }\n }\n })\n return novels\n }\n\n // 小说信息格式化\n u.formatNovels = function (novels) {\n novels.forEach(novel => {\n novel.title = novel.title.replace(RegExp(/^\\s+|\\s+$/g), \"\")\n novel.tags = novel.tags.join(\",\")\n novel.coverUrl = util.urlCoverUrl(novel.coverUrl)\n // novel.readingTime = `${novel.readingTime / 60} 分钟`\n novel.createDate = util.dateFormat(novel.createDate);\n // novel.updateDate = this.dateFormat(novel.updateDate);\n if (util.MORE_INFO_IN_DESCRIPTION) {\n novel.description = `\\n书名:${novel.title}\\n作者:${novel.userName}\\n标签:${novel.tags}\\n上传:${novel.createDate}\\n简介:${novel.description}`\n } else {\n novel.description = `\\n${novel.description}\\n上传时间:${novel.createDate}`\n }\n })\n return novels\n }\n\n // 从网址获取id,返回单篇小说 res,系列返回首篇小说 res\n u.getNovelRes = function (result) {\n let novelId = 0, res = {}\n // 兼容搜索直接输入链接\n pattern = \"(https?://)?(api\\\\.|www\\\\.)?((furrynovel\\\\.(ink|xyz))|pixiv\\\\.net)(/ajax)?/(pn|(pixiv/)?novel)/(show\\\\.php\\\\?id=|series/)?\\\\d+(/cache)?\"\n // pattern = String(bookSourceUrl).replace(\".*\", \"\")\n if (RegExp(pattern).test(result) && !(result.startsWith(\"\"))) {\n baseUrl = result.match(RegExp(pattern))[0]\n result = \"\"\n java.log(`匹配链接:${baseUrl}`)\n }\n\n let isHtml = result.startsWith(\"\")\n if (isHtml) {\n let id = baseUrl.match(new RegExp(\"\\\\d+\"))[0]\n let pattern = \"(https?://)?(www\\\\.)?pixiv\\\\.net(/ajax)?/novel/(series/)?\\\\d+\"\n let isSeries = baseUrl.match(new RegExp(pattern))\n if (isSeries) {\n java.log(`系列ID:${id}`)\n res = util.getAjaxJson(util.urlSeriesDetailed(id))\n } else {\n let pattern = \"((furrynovel\\\\.(ink|xyz))|pixiv\\\\.net)/(pn|(pixiv/)?novel)/(show\\\\.php\\\\?id=)?\\\\d+\"\n let isNovel = baseUrl.match(new RegExp(pattern))\n if (isNovel) {\n novelId = id\n }\n }\n } else {\n res = JSON.parse(result)\n }\n if (res.total !== undefined && res.total !== null) {\n novelId = res.novels[0].id\n }\n if (novelId) {\n java.log(`匹配小说ID:${novelId}`)\n res = util.getAjaxJson(util.urlNovelDetailed(novelId))\n }\n if (res.error) {\n java.log(`无法从 Linpx 获取当前小说`)\n java.log(JSON.stringify(res))\n return []\n }\n return res\n }\n\n // 从网址获取id,尽可能返回系列 res,单篇小说返回小说 res\n u.getNovelResSeries = function (result) {\n let seriesId = 0, res = {}\n let isHtml = result.startsWith(\"\")\n if (isHtml) {\n let id = baseUrl.match(new RegExp(\"\\\\d+\"))[0]\n let pattern = \"(https?://)?(www\\\\.)?pixiv\\\\.net(/ajax)?/novel/(series/)?\\\\d+\"\n let isSeries = baseUrl.match(new RegExp(pattern))\n if (isSeries) {\n seriesId = id\n } else {\n let pattern = \"((furrynovel\\\\.(ink|xyz))|pixiv\\\\.net)/(pn|(pixiv/)?novel)/(show\\\\.php\\\\?id=)?\\\\d+\"\n let isNovel = baseUrl.match(new RegExp(pattern))\n if (isNovel) {\n java.log(`匹配小说ID:${id}`)\n res = util.getAjaxJson(util.urlNovelDetailed(id))\n }\n }\n } else {\n res = JSON.parse(result)\n }\n if (res.series !== undefined && res.series !== null) {\n seriesId = res.series.id\n }\n if (seriesId) {\n java.log(`系列ID:${seriesId}`)\n res = util.getAjaxJson(util.urlSeriesDetailed(seriesId))\n }\n if (res.error) {\n java.log(`无法从 Linpx 获取当前小说`)\n java.log(JSON.stringify(res))\n return []\n }\n return res\n }\n\n u.dateFormat = function (str) {\n let addZero = function (num) {\n return num < 10 ? '0' + num : num;\n }\n let time = new Date(str);\n let Y = time.getFullYear() + \"年\";\n let M = addZero(time.getMonth() + 1) + \"月\";\n let D = addZero(time.getDate()) + \"日\";\n return Y + M + D;\n }\n u.timeTextFormat = function (text) {\n if (text === undefined) {\n return \"\"\n }\n return `${text.slice(0, 10)} ${text.slice(11, 19)}`\n }\n\n util = u\n java.put(\"util\", objStringify(u))\n}\n\npublicFunc()\njava.getStrResponse(null, null)",
"loginUrl": "",
"respondTime": 180000,
"ruleBookInfo": {
"author": "userName",
"canReName": "true",
"coverUrl": "coverUrl",
"init": "@js:\nvar util = objParse(String(java.get(\"util\")))\n\nfunction objParse(obj) {\n return JSON.parse(obj, (n, v) => {\n if (typeof v == \"string\" && v.match(\"()\")) {\n return eval(`(${v})`)\n }\n return v;\n })\n}\n\nfunction novelHandler(res){\n let info = {}\n info.novelId = res.id\n info.title = res.title.replace(RegExp(/^\\s+|\\s+$/g), \"\")\n info.userName = res.userName\n info.tags = res.tags\n info.textCount = res.length\n info.description = res.desc\n info.coverUrl = util.urlCoverUrl(res.coverUrl)\n // info.catalogUrl = util.urlNovelDetailed(res.id)\n info.createDate = util.timeTextFormat(res.createDate)\n\n if (res.series === undefined || res.series === null) {\n info.title = info.latestChapter = info.title\n info.tags.unshift('单本')\n info.detailedUrl = util.urlNovelUrl(info.novelId)\n info.catalogUrl = util.urlNovelDetailed(info.novelId)\n } else {\n info.seriesId = res.series.id\n info.title = res.series.title.replace(RegExp(/^\\s+|\\s+$/g), \"\")\n info.tags.unshift('长篇')\n info.detailedUrl = util.urlSeriesUrl(info.seriesId)\n info.catalogUrl = util.urlSeriesDetailed(info.seriesId)\n\n let res2 = util.getAjaxJson(util.urlSeriesDetailed(info.seriesId))\n info.tags = info.tags.concat(res2.tags) //合并系列 tags\n info.tags = Array.from(new Set(info.tags))\n info.description = `${res2.caption}\\n当前章节简介:\\n${info.description}`\n }\n info.tags = info.tags.join(\",\")\n if (util.MORE_INFO_IN_DESCRIPTION) {\n info.description = `\\n书名:${info.title}\\n作者:${info.userName}\\n标签:${info.tags}\\n上传:${info.createDate}\\n简介:${info.description}`\n } else {\n info.description = `\\n${info.description}\\n上传时间:${info.createDate}`\n }\n return info\n}\n\n(function (res) {\n // 为了兼顾导入书架直接走详情页逻辑,不能直接用 book.xxx 来复用搜索页处理结果\n res = util.getNovelRes(result) // 系列数据过少,暂不分流\n try {\n return novelHandler(res)\n }catch (e) {\n java.log(e)\n java.log(`受 Linpx 的限制,无法获取当前小说的数据`)\n }\n})(result)\n",
"intro": "description",
"kind": "tags",
"lastChapter": "latestChapter",
"name": "title",
"tocUrl": "catalogUrl",
"wordCount": "textCount"
},
"ruleContent": {
"content": "@js:\nvar util = objParse(String(java.get(\"util\")))\n\nfunction objParse(obj) {\n return JSON.parse(obj, (n, v) => {\n if (typeof v == \"string\" && v.match(\"()\")) {\n return eval(`(${v})`)\n }\n return v;\n })\n}\n\nfunction getContent(res) {\n let content = res.content\n if (util.SHOW_NOVEL_COMMENTS === true && res.desc !== \"\") {\n content = res.desc + \"\\n\" + \"——————————\\n\".repeat(2) + content\n }\n\n // 获取 [uploadedimage:] 的图片链接\n // 将存在的 pixiv 图片链接替换为可访问的直连\n if (res.images !== undefined && res.images !== null) {\n Object.keys(res.images).forEach((key) => {\n content = content.replace(`[uploadedimage:${key}]`, `
`)\n })\n }\n\n // 获取 [pixivimage:] 的图片链接 [pixivimage:1234] [pixivimage:1234-1]\n let matched = content.match(RegExp(/\\[pixivimage:(\\d+)-?(\\d+)]/gm))\n if (matched) {\n for (let i in matched) {\n let illustId, order\n let matched2 = matched[i].match(RegExp(\"(\\\\d+)-?(\\\\d+)\"))\n let temp = matched2[0].split(\"-\")\n illustId = temp[0]\n if (temp.length >= 2) {\n order = temp[1]\n }\n content = content.replace(`${matched[i]}`, `
`)\n }\n }\n\n // 替换 Pixiv 分页标记符号 [newpage]\n matched = content.match(RegExp(/[ ]*\\[newpage][ ]*/gm))\n if (matched) {\n for (let i in matched) {\n java.log(matched[i])\n content = content.replace(`${matched[i]}`, `${\"
\".repeat(3)}`)\n }\n }\n\n // 替换 Pixiv 章节标记符号 [chapter:]\n matched = content.match(RegExp(/\\[chapter:(.*?)]/gm))\n if (matched) {\n for (let i in matched) {\n let matched2 = matched[i].match(/\\[chapter:(.*?)]/m)\n let chapter = matched2[1].trim()\n content = content.replace(`${matched[i]}`, `${chapter}
`)\n }\n }\n\n // 替换 Pixiv 跳转页面标记符号 [[jump:]]\n matched = content.match(RegExp(/\\[jump:(\\d+)]/gm))\n if (matched) {\n for (let i in matched) {\n let page = matched[i].match(/\\d+/)\n content = content.replace(`${matched[i]}`, `\\n\\n跳转至第${page}节`)\n }\n }\n\n // 替换 Pixiv 链接标记符号 [[jumpuri: > ]]\n matched = content.match(RegExp(/\\[\\[jumpuri:(.*?)>(.*?)]]/gm))\n if (matched) {\n for (let i in matched) {\n let matched2 = matched[i].match(/\\[\\[jumpuri:(.*?)>(.*?)]]/m)\n let matchedText = matched2[0]\n let urlName = matched2[1].trim()\n let urlLink = matched2[2].trim()\n // 阅读不支持超链接\n // content = content.replace(`${matchedText}`, `${urlName}`)\n if (urlLink === urlName) {\n content = content.replace(`${matchedText}`, `${urlName}`)\n } else {\n content = content.replace(`${matchedText}`, `${urlName}: ${urlLink}`)\n }\n }\n }\n\n // 替换 Pixiv 注音标记符号 [[rb: > ]]\n matched = content.match(RegExp(/\\[\\[rb:(.*?)>(.*?)]]/gm))\n if (matched) {\n for (let i in matched) {\n let matched2 = matched[i].match(/\\[\\[rb:(.*?)>(.*?)]]/m)\n let matchedText = matched2[0]\n let kanji = matched2[1].trim()\n let kana = matched2[2].trim()\n\n if (!util.REPLACE_BOOK_TITLE_MARKS) {\n // 默认替换成(括号)\n content = content.replace(`${matchedText}`, `${kanji}(${kana})`)\n } else {\n let reg = RegExp(\"[\\\\u4E00-\\\\u9FFF]+\", \"g\");\n if (reg.test(kana)) {\n // kana为中文,则替换回《书名号》\n content = content.replace(`${matchedText}`, `${kanji}《${kana}》`)\n } else {\n // 阅读不支持