From a31eae421f50fb89cf4ed7e113148cd1e0ebf870 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sat, 17 Aug 2024 10:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJuying.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJuying.js | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/SrcJuying.js b/SrcJuying.js index 1447da35..fe3a3ccf 100644 --- a/SrcJuying.js +++ b/SrcJuying.js @@ -44,6 +44,7 @@ function search(name, sstype, jkdata) { } }) }else if(sstype=='dianboerji'){ + /* ssdata = getSsData2(name, jkdata, 1).map(it => { let extra = { cls: "Juloadlist grouploadlist", @@ -64,7 +65,74 @@ function search(name, sstype, jkdata) { col_type: 'avatar', extra: extra } - }) + })*/ + let api_url = jkdata.url || ""; + let ssurl, detailurl, noerji; + detailurl = api_url + '?ac=videolist&ids='; + ssurl = api_url + '?ac=videolist&wd=' + name; + listnode = "json.list"; + + + let lists = []; + let gethtml = ""; + try { + let json; + gethtml = request(ssurl); + json = JSON.parse(gethtml); + + try { + lists = json.list || json.data.list || json.data || []; + } catch (e) { + //lists = json.list || json.data.list || json.data || []; + } + + lists = lists.map(list => { + let vodname = list.vod_name || list.title; + let vodpic = list.vod_pic || list.pic || ""; + let voddesc = list.vod_remarks || list.state || ""; + let vodurl = list.vod_id ? detailurl + list.vod_id : list.nextlink; + let vodcontent = list.vod_content || list.vod_blurb || ""; + return { + name: vodname, + pic: vodpic, + desc: voddesc, + id: vodurl.split("@@")[0], + content: vodcontent + } + }) + } catch (e) { + log(jkdata.name + ' 搜索数据报错>' + e.message + " 错误行#" + e.lineNumber); + } + + let searchs = []; + if (lists.length > 0) { + try { + lists.forEach((list) => { + let vodpic = list.pic ? list.pic.replace(/http.*\/tu\.php\?tu=|\/img\.php\?url=| |\/tu\.php\?tu=/g, '') : getIcon("404.jpg"); + if(!/^hiker/.test(vodpic)){ + if (/^\/\//.test(vodpic)) { + vodpic = "https:" + vodpic; + } + if(!/^http/.test(vodpic) && list.id.startsWith('http')){ + vodpic = getHome(list.id) + vodpic; + } + } + if (searchContains(list.name, name, true)) { + searchs.push({ + vod_name: list.name.replace('立刻播放',''), + vod_desc: list.desc, + vod_content: list.content, + vod_pic: vodpic, + vod_url: list.id, + vod_play: noerji?list.id:"" + }) + } + }); + } catch (e) { + log(jkdata.name + ' 输出结果报错>' + e.message + " 错误行#" + e.lineNumber); + } + } + ssdata = searchs; } return ssdata; }