diff --git a/js/凤凰FM.js b/js/凤凰FM.js new file mode 100644 index 0000000..edfd823 --- /dev/null +++ b/js/凤凰FM.js @@ -0,0 +1,99 @@ +globalThis.h_ost = 'https://s.fm.renbenai.com'; +var rule = { + title: '凤凰FM', + host: h_ost, + url: '/fm/read/fmd/android/600/getProgramList.html&cid=fyclass&pagenum=fypage', + homeUrl: '/fm/read/fmd/static/categoryTvGet_100.html', + detailUrl: '/fm/read/fmd/android/getProgramAudioList_620.html&pid=fyid', + searchUrl: '/fm/read/fmd/public/search_720.html&keyWord=**&searchType=1&pageNum=fypage', + searchable: 2, + quickSearch: 1, + filterable: 0, + headers: { + 'User-Agent': 'okhttp/3.12.11', + 'Cookie': 'KLBRSID=9b9dd35888924d7c870dd3474e89cab6|1753290568|1753290499' + }, + play_parse: true, + search_match: true, + class_parse: $js.toString(() => { + let html = request(input); + let classes = []; + let data = JSON.parse(html).data.list[0].channelContent; + data.forEach((it) => { + let typeName = it.nodeName; + let typeId = it.id; + classes.push({ + type_name: typeName, + type_id: typeId, + }); + }); + input = classes; + }), + 一级: $js.toString(() => { + let d = []; + let html = request(input); + let data = JSON.parse(html).data.hotList; + data.forEach(item => { + let title = item.programName; + if (!/名称|排除/.test(title)) { + d.push({ + title: title, + desc: item.resourceTitle, + img: item.img640_640, + url: item.id, + }); + } + }); + setResult(d); + }), + 二级: $js.toString(() => { + let html = request(input); + let list = JSON.parse(html).data.list; + VOD = { + vod_name: list[0]['title'] || '暂无名称', + type_name: list[0]['vod_class'] || '暂无类型', + vod_pic: list[0]['img370_370'] || '暂无图片', + vod_remarks: list[0]['tags'] || '暂无备注', + vod_content: list[0]['programDetails'] || '暂无剧情介绍' + }; + let playlist = list[0]['audiolist']; + let playForm = []; + let playUrls = []; + list.forEach(item => { + const title = item.title; + const firstUrl = item.audiolist && item.audiolist[0] ? item.audiolist[0].filePath : ''; + playUrls.push(`${title}$${firstUrl}`); + }); + VOD.vod_play_from = '凤凰FM'; + VOD.vod_play_url = playUrls.join('#'); + }), + 搜索: $js.toString(() => { + let d = []; + let html = request(input); + let data = JSON.parse(html).data.program; + if (rule.search_match) { + data = data.filter(it => { + let title = it.programName; + return title && new RegExp(KEY, "i").test(title); + }); + } + data.forEach(item => { + let title = item.programName; + if (!/名称|排除/.test(title)) { + d.push({ + title: title, + desc: item.programName, + img: item.img640_640, + url: item.id, + }); + } + }); + setResult(d); + }), + lazy: $js.toString(() => { + input = { + parse: 0, + url: input + }; + }), +} \ No newline at end of file diff --git a/js/果果.js b/js/果果.js new file mode 100644 index 0000000..4211ef0 --- /dev/null +++ b/js/果果.js @@ -0,0 +1,243 @@ +//小心儿悠悠// +var rule = { + title: '百忙无果[官]', + host: 'https://pianku.api.mgtv.com', + homeUrl: '', + searchUrl: 'https://mobileso.bz.mgtv.com/msite/search/v2?q=**&pn=fypage&pc=10', + detailUrl: 'https://pcweb.api.mgtv.com/episode/list?page=1&size=50&video_id=fyid', + searchable: 2, + quickSearch: 0, + filterable: 1, + multi: 1, + url: '/rider/list/pcweb/v3?platform=pcweb&channelId=fyclass&pn=fypage&pc=80&hudong=1&_support=10000000&kind=a1&area=a1', + filter_url: 'year={{fl.year or "all"}}&sort={{fl.sort or "all"}}&chargeInfo={{fl.chargeInfo or "all"}}', + headers: { + 'User-Agent': 'PC_UA' + }, + timeout: 5000, + class_name: '电视剧&电影&综艺&动漫&纪录片&教育&少儿', + class_url: '2&3&1&50&51&115&10', + filter: { + "1": getCommonFilter(), + "2": getCommonFilter(), + "3": getCommonFilter(), + "50": getCommonFilter(), + "51": getCommonFilter(), + "115": getCommonFilter() + }, + limit: 20, + play_parse: true, + lazy: $js.toString(() => { + try { + let api = input.split("?")[0]; + let response = fetch(api, { + method: 'get', + headers: { + 'User-Agent': 'okhttp/3.14.9', + 'Content-Type': 'application/x-www-form-urlencoded' + } + }); + let bata = JSON.parse(response); + input = { + parse: 0, + url: bata.url.includes("mgtv") ? bata.url : input.split("?")[0], + jx: bata.url.includes("mgtv") ? 0 : 1, + danmaku: "http://103.36.220.166:98/tvbox/zh.php?url=" + input.split("?")[0] + }; + } catch { + input = { + parse: 0, + url: input.split("?")[0], + jx: 1, + danmaku: "http://103.36.220.166:98/tvbox/zh.php?url=" + input.split("?")[0] + }; + } + }), + 一级: 'json:data.hitDocs;title;img;updateInfo||rightCorner.text;playPartId', + 二级: $js.toString(() => { + fetch_params.headers.Referer = "https://www.mgtv.com"; + fetch_params.headers["User-Agent"] = MOBILE_UA; + + let videoId = input.split('video_id=')[1].split('&')[0]; + let infoUrl = `https://pcweb.api.mgtv.com/video/info?allowedRC=1&vid=${videoId}&type=b&_support=10000000`; + let infoData = JSON.parse(request(infoUrl)); + + if (infoData && infoData.data && infoData.data.info) { + let detail = infoData.data.info.detail || {}; + VOD = { + vod_name: infoData.data.info.title || "", + type_name: detail.kind || "", + vod_year: detail.releaseTime || "", + vod_area: detail.area || "", + vod_actor: detail.leader || "", + vod_director: detail.director || "", + vod_content: detail.story || "", + vod_remarks: detail.updateInfo || "" + }; + if (detail.img) VOD.vod_pic = detail.img; + } + + let d = []; + let html = request(input); + let json = JSON.parse(html); + let host = "https://www.mgtv.com"; + let ourl = json.data.list.length > 0 ? json.data.list[0].url : json.data.series[0].url; + if (!/^http/.test(ourl)) ourl = host + ourl; + + fetch_params.headers["User-Agent"] = MOBILE_UA; + html = request(ourl); + if (html.includes("window.location =")) { + ourl = pdfh(html, "meta[http-equiv=refresh]&&content").split("url=")[1]; + html = request(ourl); + } + + try { + let details = pdfh(html, ".m-details&&Html").replace(/h1>/, "h6>").replace(/div/g, "br"); + let actor = "", director = "", time = ""; + if (/播出时间/.test(details)) { + actor = pdfh(html, "p:eq(5)&&Text").substr(0, 25); + director = pdfh(html, "p:eq(4)&&Text"); + time = pdfh(html, "p:eq(3)&&Text"); + } else { + actor = pdfh(html, "p:eq(4)&&Text").substr(0, 25); + director = pdfh(html, "p:eq(3)&&Text"); + time = "已完结"; + } + let _img = pd(html, ".video-img&&img&&src"); + let JJ = pdfh(html, ".desc&&Text").split("牛马简介:")[1]; + VOD.vod_name = VOD.vod_name || pdfh(html, ".vt-txt&&Text"); + VOD.type_name = VOD.type_name || pdfh(html, "p:eq(0)&&Text").substr(0, 6); + VOD.vod_area = VOD.vod_area || pdfh(html, "p:eq(1)&&Text"); + VOD.vod_actor = VOD.vod_actor || actor; + VOD.vod_director = VOD.vod_director || director; + VOD.vod_remarks = VOD.vod_remarks || time; + VOD.vod_pic = VOD.vod_pic || _img; + VOD.vod_content = VOD.vod_content || JJ; + if (!VOD.vod_name) VOD.vod_name = VOD.type_name; + } catch (e) { + log("获取影片信息发生错误:" + e.message); + } + + function getRjpg(imgUrl, xs) { + xs = xs || 3; + let picSize = /jpg_/.test(imgUrl) ? imgUrl.split("jpg_")[1].split(".")[0] : false; + let rjpg = false; + if (picSize) { + let a = parseInt(picSize.split("x")[0]) * xs; + let b = parseInt(picSize.split("x")[1]) * xs; + rjpg = a + "x" + b + ".jpg"; + } + return /jpg_/.test(imgUrl) && rjpg ? imgUrl.replace(imgUrl.split("jpg_")[1], rjpg) : imgUrl; + } + + if (json.data.total === 1 && json.data.list.length === 1) { + let data = json.data.list[0]; + d.push({ + title: data.t4, + desc: data.t2, + pic_url: getRjpg(data.img), + url: "https://www.mgtv.com" + data.url + }); + } else if (json.data.list.length > 1) { + for (let i = 1; i <= json.data.total_page; i++) { + if (i > 1) json = JSON.parse(fetch(input.replace("page=1", "page=" + i), {})); + json.data.list.forEach(function(data) { + if (data.isIntact == "1") { + d.push({ + title: data.t4, + desc: data.t2, + pic_url: getRjpg(data.img), + url: "https://www.mgtv.com" + data.url + }); + } + }); + } + } else { + print(input + "暂无片源"); + } + VOD.vod_play_from = "芒果TV"; + VOD.vod_play_url = d.map(function(it) { + return it.title + "$" + it.url; + }).join("#"); + setResult(d); + }), + 搜索: $js.toString(() => { + fetch_params.headers.Referer = "https://www.mgtv.com"; + fetch_params.headers["User-Agent"] = MOBILE_UA; + let d = []; + let html = request(input); + let json = JSON.parse(html); + json.data.contents.forEach(function(data) { + if (data.type && data.type == 'media') { + let item = data.data[0]; + if (item.source === "imgo") { + let fyclass = ''; + try { + fyclass = item.rpt.match(/idx=(.*?)&/)[1] + '$'; + } catch (e) { + log(e.message); + } + d.push({ + title: item.title.replace(/|<\/B>/g, ''), + img: item.img || '', + content: '', + desc: item.desc.join(','), + url: fyclass + item.url.match(/.*\/(.*?)\.html/)[1] + }); + } + } + }); + setResult(d); + }) +}; + +function getCommonFilter() { + return [{ + "key": "chargeInfo", + "name": "付费类型", + "value": [ + {"n": "全部", "v": "all"}, + {"n": "免费", "v": "b1"}, + {"n": "vip", "v": "b2"}, + {"n": "VIP用券", "v": "b3"}, + {"n": "付费点播", "v": "b4"} + ] + }, { + "key": "sort", + "name": "排序", + "value": [ + {"n": "最新", "v": "c1"}, + {"n": "最热", "v": "c2"}, + {"n": "知乎高分", "v": "c4"} + ] + }, { + "key": "year", + "name": "年代", + "value": [ + {"n": "全部", "v": "all"}, + {"n": "2026", "v": "2026"}, + {"n": "2025", "v": "2025"}, + {"n": "2024", "v": "2024"}, + {"n": "2023", "v": "2023"}, + {"n": "2022", "v": "2022"}, + {"n": "2021", "v": "2021"}, + {"n": "2020", "v": "2020"}, + {"n": "2019", "v": "2019"}, + {"n": "2018", "v": "2018"}, + {"n": "2017", "v": "2017"}, + {"n": "2016", "v": "2016"}, + {"n": "2015", "v": "2015"}, + {"n": "2014", "v": "2014"}, + {"n": "2013", "v": "2013"}, + {"n": "2012", "v": "2012"}, + {"n": "2011", "v": "2011"}, + {"n": "2010", "v": "2010"}, + {"n": "2009", "v": "2009"}, + {"n": "2008", "v": "2008"}, + {"n": "2007", "v": "2007"}, + {"n": "2006", "v": "2006"}, + {"n": "2005", "v": "2005"}, + {"n": "2004", "v": "2004"} + ] + }]; +} diff --git a/js/电影港.js b/js/电影港.js new file mode 100644 index 0000000..03f2f66 --- /dev/null +++ b/js/电影港.js @@ -0,0 +1,159 @@ +var rule = { +author: '小可乐/v6.1.1', +title: '电影港', +类型: '影视', +host: 'https://www.dyg123.net', +headers: {'User-Agent': MOBILE_UA}, +编码: 'utf-8', +timeout: 5000, + +homeUrl: '/', +url: '/e/action/ListInfo.php?fyfilter', +filter_url: 'classid={{fl.cateId or "fyclass"}}&page=(fypage-1)&line=30&tempid=1&orderby={{fl.by or "newstime"}}', +searchUrl: '/e/search/index.php', +detailUrl: '', + +limit: 9, +double: false, +class_name: '电影&剧集&综艺&动画&短剧', +class_url: '1&20&31&30&32', + +推荐: '*', +一级: $js.toString(() => { + let resHtml = fetch(input); + VODS = rule.getVodList(resHtml); +}), +搜索: $js.toString(() => { + VODS = []; + let fbody = `keyboard=${KEY}&submit=搜索&show=title&tempid=1`; + let resHtml = fetch(input, { + headers: { + ...rule.headers, + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + method: 'POST', + body: fbody + }); + let fvods = rule.getVodList(resHtml); + VODS.push(...fvods); + let flagNum = rule.cutStr(resHtml, 'searchid=', '"', ''); + if (flagNum) { + let sUrl = `${HOST}/e/search/result/index.php?page=1&searchid=${flagNum}`; + resHtml = fetch(sUrl); + fvods = rule.getVodList(resHtml); + VODS.push(...fvods); + } +}), + +二级: $js.toString(() => { + let [id, kname, kpic, kremarks] = input.split('@'); + let resHtml = fetch(id); + let kdetail = pdfh(resHtml, '.ct-l').split('')[0].replace(/[\u3000\s]+/g, ''); + let [ktabs, kurls] = [[], []]; + let xz_tabs = pdfa(resHtml, 'strong:has(span)').map((it,idx) => rule.cutStr(it, '【', '】', `磁力线${idx+1}`)); + ktabs.push(...xz_tabs); + let zx_tabs = pdfa(resHtml, '#tab81').map((it,idx) => pdfh(it, 'body&&Text')); + ktabs.push(...zx_tabs); + let xz_urls = pdfa(resHtml, 'tbody').map(item => { + let xz_url = pdfa(item, 'a').map(it => { return pdfh(it, 'body&&Text') + '$' + pdfh(it, 'a&&href') }); + return xz_url.join('#') + }); + kurls.push(...xz_urls); + let zx_urls = pdfa(resHtml, '.videourl').map(item => { + let zx_url = pdfa(item, 'a').map(it => { return pdfh(it, 'body&&Text') + '$' + pd(it, 'a&&href', HOST) }); + return zx_url.join('#') + }); + kurls.push(...zx_urls); + VOD = { + vod_id: id, + vod_name: kname, + vod_pic: kpic, + type_name: rule.cutStr(kdetail, '◎类别', '◎', '类型'), + vod_remarks: rule.cutStr(kdetail, '◎集数', '◎', '状态'), + vod_year: rule.cutStr(kdetail, '◎年代', '◎', '1000'), + vod_area: rule.cutStr(kdetail, '◎产地', '◎', '地区'), + vod_lang: rule.cutStr(kdetail, '◎语言', '◎', '语言'), + vod_director: rule.cutStr(kdetail, '◎导演', '◎', '导演'), + vod_actor: rule.cutStr(kdetail, '◎演员', '
', '') || rule.cutStr(kdetail, '◎主演', '', '主演'), + vod_content: rule.cutStr(kdetail, '◎简介£>', '', '') || kname, + vod_play_from: ktabs.join('$$$'), + vod_play_url: kurls.join('$$$') + }; +}), + +play_parse: true, +lazy: $js.toString(() => { + let kp = 0, kurl = ''; + if (/^magnet/.test(input)) { + kurl = input; + } else { + let resHtml = fetch(input); + let jurl = rule.cutStr(resHtml, "a:'", "'", ''); + if (/m3u8|mp4|mkv/.test(jurl)) { + kurl = jurl; + } else { + jurl = rule.cutStr(resHtml, '