🍎 终极全栖接口聚合
苹果通用API接口聚合
mengluo9960 (14501)3天前
🍎 苹果通用全栖接口聚合
移除了一些接口链接,可自行添加,/provide/vod/是影视接口,/provide/art/是小说图集接口。
在发现中添加,按照模板添加即可,在发现中切换影视或者小说和图集。
图集的话可以在界面中配置适配图片的段距等。
{
"bookSourceGroup": "影视,小说,图片",
"bookSourceName": "🍎 终极全栖接口聚合 ",
"bookSourceType": 0,
"bookSourceUrl": "苹果通用API接口聚合",
"customButton": false,
"customOrder": 2,
"enabled": true,
"enabledCookieJar": true,
"enabledExplore": true,
"eventListener": false,
"exploreUrl": "@js:\nvar apiMap = {\n '影视-如意': 'https:\/\/cj.rycjapi.com\/api.php\/provide\/vod\/',\n '影视-无水印': 'https:\/\/api.wsyzy.net\/api.php\/provide\/vod\/',\n '影视-红牛': 'https:\/\/www.hongniuzy2.com\/api.php\/provide\/vod\/',\n '影视-豪华': 'https:\/\/hhzyapi.com\/api.php\/provide\/vod\/',\n '影视-速播': 'https:\/\/subocj.com\/api.php\/provide\/vod\/',\n '影视-索尼': 'https:\/\/suoniapi.com\/api.php\/provide\/vod\/',\n '影视-量子': 'https:\/\/cj.lziapi.com\/api.php\/provide\/vod\/',\n '影视-暴风': 'https:\/\/bfzyapi.com\/api.php\/provide\/vod\/',\n '影视-360': 'https:\/\/360zy.com\/api.php\/provide\/vod\/',\n '影视-魔都': 'https:\/\/caiji.moduapi.cc\/api.php\/provide\/vod\/',\n '影视-香蕉': '链接',\n '影视-细胞': '链接',\n '影视-番号': '链接',\n '影视-极品': '链接',\n '影视-奥斯卡': '链接',\n '影视-搜V资源': '链接',\n '影视-黑料': '链接',\n '影视-杏吧': '链接',\n '影视-红楼': '链接',\n '影视-乐播': '链接',\n '小说-jkun': '链接',\n '小说-155': '链接',\n '小说-杏吧': '链接',\n '小说-红楼': '链接',\n '小说-乐播':'链接'\n};\nvar apiGroups = {\n '影视-常规': ['影视-如意', '影视-无水印', '影视-红牛', '影视-豪华', '影视-速播', '影视-索尼', '影视-量子', '影视-暴风', '影视-360', '影视-魔都'],\n '影视-18禁': ['影视-香蕉', '影视-细胞', '影视-番号', '影视-极品', '影视-奥斯卡', '影视-搜V资源', '影视-黑料', '影视-杏吧', '影视-红楼','影视-乐播'],\n '小说与图集': ['小说-jkun', '小说-155','小说-杏吧','小说-红楼','小说-乐播']\n};\nvar vars = {};\ntry { vars = JSON.parse(source.getVariable()); } catch (e) { vars = { group: '影视-常规', api: '影视-如意', url: apiMap['影视-如意'] }; }\nvar currentGroup = vars.group || '影视-常规';\nvar currentApi = vars.api || '影视-如意';\nif (apiGroups[currentGroup].indexOf(currentApi) === -1) { currentApi = apiGroups[currentGroup][0]; }\nvar base = apiMap[currentApi] || apiMap['影视-如意'];\nvar isArt = base.indexOf('\/art\/') !== -1;\n\nvar actionChange = \"var map=\" + JSON.stringify(apiMap) + \"; var g=infoMap['接口类型']||'影视-常规'; var a=infoMap['接口选择']||'影视-如意'; var u=map[a]; source.setVariable(JSON.stringify({group:g, api:a, url:u})); java.toast('切换成功,正在加载引擎...'); java.refreshExplore();\";\n\nvar ui = [];\nui.push({ title: '接口类型', type: 'select', chars: Object.keys(apiGroups), default: currentGroup, action: actionChange, style: { layout_flexBasisPercent: 1 } });\nui.push({ title: '接口选择', type: 'select', chars: apiGroups[currentGroup], default: currentApi, action: actionChange, style: { layout_flexBasisPercent: 1 } });\nui.push({ title: '全局关键字', type: 'text', default: '', style: { layout_flexBasisPercent: 1 } });\nui.push({ title: '🔍 当前接口搜', type: 'button', action: \"var k = infoMap['全局关键字']; if(!k){ java.toast('输入为空'); } else { java.searchBook(k, source); }\", style: { layout_flexBasisPercent: 1 } });\n\nvar rawCats = [];\nvar parentMap = {};\ntry {\n var jsonStr = java.ajax(base + '?ac=list&at=json');\n rawCats = JSON.parse(jsonStr).class || [];\n for (var i = 0; i < rawCats.length; i++) { parentMap[rawCats[i].type_id] = rawCats[i].type_name; }\n} catch (e) {}\n\nvar ignoreIds = [1, 2, 3, 4];\nvar seen = {};\nfor (var i = 0; i < rawCats.length; i++) {\n var c = rawCats[i];\n if (!c.type_id || !c.type_name || ignoreIds.indexOf(parseInt(c.type_id, 10)) !== -1 || seen[c.type_id]) continue;\n seen[c.type_id] = true;\n var pName = parentMap[c.type_pid] || '';\n var name = pName && pName !== c.type_name ? pName + '-' + c.type_name : c.type_name;\n ui.push({ title: name, url: base + '?ac=' + (isArt ? 'list' : 'videolist') + '&t=' + c.type_id + '&pg={{page}}&at=json', style: { layout_flexGrow: 1, layout_flexBasisPercent: 0.31 } });\n}\nJSON.stringify(ui);",
"lastUpdateTime": "1788611516873",
"respondTime": 180000,
"ruleBookInfo": {
"author": "@js: var d = typeof result === 'string' ? JSON.parse(result) : result; var i = (d && d.list) ? d.list[0] : {}; i.vod_actor || i.art_actor || '未知';",
"coverUrl": "@js: var d = typeof result === 'string' ? JSON.parse(result) : result; var i = (d && d.list) ? d.list[0] : {}; i.vod_pic || i.art_pic || '';",
"intro": "@js: var d = typeof result === 'string' ? JSON.parse(result) : result; var i = (d && d.list) ? d.list[0] : {}; i.vod_blurb || i.art_blurb || i.vod_content || i.art_content || '';",
"kind": "@js: var d = typeof result === 'string' ? JSON.parse(result) : result; var i = (d && d.list) ? d.list[0] : {}; (i.vod_class || i.art_class || '') + ',' + (i.vod_year || i.art_time || '');",
"lastChapter": "@js: var d = typeof result === 'string' ? JSON.parse(result) : result; var i = (d && d.list) ? d.list[0] : {}; i.vod_remarks || i.art_time || '';",
"name": "@js:\nvar d = typeof result === 'string' ? JSON.parse(result) : result;\nvar i = (d && d.list) ? d.list[0] : {};\nvar isArt = !!i.art_name;\nif (typeof book !== 'undefined' && book != null) { book.setType(isArt ? 0 : 4); }\ni.vod_name || i.art_name || '';",
"wordCount": "@js: var d = typeof result === 'string' ? JSON.parse(result) : result; var i = (d && d.list) ? d.list[0] : {}; i.vod_score || i.art_score || '';"
},
"ruleContent": {
"content": "@js:\nvar api = String(baseUrl).split('?')[0];\nvar isArt = api.indexOf('\/art\/') !== -1;\nvar out = baseUrl;\n\nif (isArt) {\n var d = typeof result === 'string' ? JSON.parse(result) : result;\n var obj = (d && d.list) ? d.list[0] : {};\n var html = obj.art_content || obj.art_pic || '';\n var imgs = html.match(\/https?:\\\/\\\/[^\\s\"'<>]+\\.(?:jpg|jpeg|png|gif|webp)\/gi);\n if (imgs && imgs.length > 0) {\n out = imgs.map(function(u){return '<img src=\"' + u + '\">';}).join('\\n');\n } else {\n out = html.replace(\/\\n\/g, '<br>');\n }\n}\nout;",
"imageStyle": "FULL",
"nextContentUrl": "@js:\nvar nextUrl = '';\ntry {\n var d = JSON.parse(result);\n var cp = parseInt(d.page || 1);\n var pc = parseInt(d.pagecount || d.total || 1);\n if (cp < pc) {\n var u = String(baseUrl);\n nextUrl = u.indexOf('&pg=') !== -1 ? u.replace(\/&pg=\\d+\/, '&pg=' + (cp + 1)) : u + '&pg=' + (cp + 1);\n }\n} catch(e) {}\nnextUrl;",
"replaceRegex": "##.*https:\/\/p22.k00ppc.com.*"
},
"ruleExplore": {
"author": "@js: result.vod_actor || result.art_actor || '未知'",
"bookList": "$.list",
"bookUrl": "@js:\nvar api = String(baseUrl).split('?')[0];\nvar isArt = api.indexOf('\/art\/') !== -1;\nif (typeof book !== 'undefined' && book != null) { book.setType(isArt ? 0 : 4); }\napi + '?ac=detail&ids=' + (isArt ? result.art_id : result.vod_id);",
"coverUrl": "@js: result.vod_pic || result.art_pic || ''",
"intro": "@js: result.vod_blurb || result.art_blurb || ''",
"kind": "@js: (result.vod_class || result.art_class || '') + ',' + (result.vod_year || result.art_time || '')",
"lastChapter": "@js: result.vod_remarks || result.art_time || ''",
"name": "@js: result.vod_name || result.art_name || ''",
"wordCount": "@js: result.vod_score || result.art_score || ''"
},
"ruleSearch": {
"author": "@js: result.vod_actor || result.art_actor || '未知'",
"bookList": "$.list",
"bookUrl": "@js:\nvar api = String(baseUrl).split('?')[0];\nvar isArt = api.indexOf('\/art\/') !== -1;\nif (typeof book !== 'undefined' && book != null) { book.setType(isArt ? 0 : 4); }\napi + '?ac=detail&ids=' + (isArt ? result.art_id : result.vod_id);",
"coverUrl": "@js: result.vod_pic || result.art_pic || ''",
"intro": "@js: result.vod_blurb || result.art_blurb || ''",
"kind": "@js: (result.vod_class || result.art_class || '') + ',' + (result.vod_year || result.art_time || '')",
"lastChapter": "@js: result.vod_remarks || result.art_time || ''",
"name": "@js: result.vod_name || result.art_name || ''",
"wordCount": "@js: result.vod_score || result.art_score || ''"
},
"ruleToc": {
"chapterList": "@js:\nvar api = String(baseUrl).split('?')[0];\nvar isArt = api.indexOf('\/art\/') !== -1;\n\nif (typeof book !== 'undefined' && book != null) { book.setType(isArt ? 0 : 4); }\n\nvar list = [];\nif (isArt) {\n list.push({name: '正文浏览', url: baseUrl});\n} else {\n try {\n var d = typeof result === 'string' ? JSON.parse(result) : result;\n var vod = (d && d.list) ? d.list[0] : {};\n var playFrom = (vod.vod_play_from || '').split('$$$');\n var playUrl = (vod.vod_play_url || '').split('$$$');\n for (var i = 0; i < playUrl.length; i++) {\n if (!playUrl[i]) continue;\n var lineName = (playFrom[i] || '线路' + (i+1)).trim();\n var episodes = playUrl[i].split('#');\n for (var j = 0; j < episodes.length; j++) {\n if (!episodes[j]) continue;\n var parts = episodes[j].split('$');\n \/\/ 核心修复点:无视垃圾站的数据缺失,强吃裸链\n if (parts.length > 1) {\n list.push({ name: lineName + ' - ' + parts[0], url: parts[1] });\n } else {\n var epName = episodes.length > 1 ? ('第' + (j+1) + '集') : '播放';\n list.push({ name: lineName + ' - ' + epName, url: parts[0] });\n }\n }\n }\n } catch(e) {}\n}\nlist;",
"chapterName": "name",
"chapterUrl": "url"
},
"searchUrl": "@js:\nvar vars = {};\ntry { vars = JSON.parse(source.getVariable()); } catch(e) {}\nvar api = vars.url || 'https:\/\/cj.rycjapi.com\/api.php\/provide\/vod\/';\nvar ac = api.indexOf('\/art\/') !== -1 ? 'list' : 'videolist';\napi + '?ac=' + ac + '&wd=' + encodeURIComponent(key) + '&pg=' + page + '&at=json';",
"weight": 0
}