|
|
@ -63,7 +63,7 @@ function getYiData(jkdata) { |
|
|
|
listurl = extdata["cateUrl"] ? /^http/.test(extdata["cateUrl"]) ? extdata["cateUrl"] : host + extdata["cateUrl"] : ""; |
|
|
|
listurl = extdata["cateUrl"] ? /^http/.test(extdata["cateUrl"]) ? extdata["cateUrl"] : host + extdata["cateUrl"] : ""; |
|
|
|
} else if (api_type == "XYQ") { |
|
|
|
} else if (api_type == "XYQ") { |
|
|
|
if (extdata["请求头参数"]) { |
|
|
|
if (extdata["请求头参数"]) { |
|
|
|
if(extdata["请求头参数"].includes('#')){ |
|
|
|
if (extdata["请求头参数"].includes('#') || extdata["请求头参数"].includes('$')) { |
|
|
|
extdata["请求头参数"].split('#').forEach(v => { |
|
|
|
extdata["请求头参数"].split('#').forEach(v => { |
|
|
|
headers[v.split('$')[0]] = v.split('$')[1]; |
|
|
|
headers[v.split('$')[0]] = v.split('$')[1]; |
|
|
|
}) |
|
|
|
}) |
|
|
@ -551,8 +551,9 @@ function getSsData(name, jkdata) { |
|
|
|
let api_url = jkdata.url || ""; |
|
|
|
let api_url = jkdata.url || ""; |
|
|
|
let api_ua = jkdata.ua || "MOBILE_UA"; |
|
|
|
let api_ua = jkdata.ua || "MOBILE_UA"; |
|
|
|
api_ua = api_ua == "MOBILE_UA" ? MOBILE_UA : api_ua == "PC_UA" ? PC_UA : api_ua; |
|
|
|
api_ua = api_ua == "MOBILE_UA" ? MOBILE_UA : api_ua == "PC_UA" ? PC_UA : api_ua; |
|
|
|
|
|
|
|
let headers = { 'User-Agent': api_ua }; |
|
|
|
|
|
|
|
|
|
|
|
let vodurlhead,ssurl,listnode,extdata; |
|
|
|
let vodurlhead, ssurl, postdata, listnode, extdata; |
|
|
|
if (api_type == "v1") { |
|
|
|
if (api_type == "v1") { |
|
|
|
let date = new Date(); |
|
|
|
let date = new Date(); |
|
|
|
let mm = date.getMonth() + 1; |
|
|
|
let mm = date.getMonth() + 1; |
|
|
@ -577,7 +578,7 @@ function getSsData(name, jkdata) { |
|
|
|
vodurlhead = api_url + '?ac=videolist&ids='; |
|
|
|
vodurlhead = api_url + '?ac=videolist&ids='; |
|
|
|
ssurl = api_url + '?ac=videolist&wd=' + name; |
|
|
|
ssurl = api_url + '?ac=videolist&wd=' + name; |
|
|
|
listnode = "html.list"; |
|
|
|
listnode = "html.list"; |
|
|
|
} else if (api_type=="XPath"||api_type=="biubiu"||api_type=="XBPQ") { |
|
|
|
} else if (/XPath|biubiu|XBPQ|XYQ/.test(api_type)) { |
|
|
|
extdata = extDataCache(jkdata) |
|
|
|
extdata = extDataCache(jkdata) |
|
|
|
if ($.type(extdata) == 'object') { |
|
|
|
if ($.type(extdata) == 'object') { |
|
|
|
if (api_type == "XBPQ") { |
|
|
|
if (api_type == "XBPQ") { |
|
|
@ -589,16 +590,30 @@ function getSsData(name, jkdata) { |
|
|
|
ssurl = extdata["searchUrl"].replace('{wd}', name).replace('{pg}', MY_PAGE); |
|
|
|
ssurl = extdata["searchUrl"].replace('{wd}', name).replace('{pg}', MY_PAGE); |
|
|
|
ssurl = /^http/.test(ssurl) ? ssurl : extdata["homeUrl"] + ssurl; |
|
|
|
ssurl = /^http/.test(ssurl) ? ssurl : extdata["homeUrl"] + ssurl; |
|
|
|
vodurlhead = getHome(ssurl); |
|
|
|
vodurlhead = getHome(ssurl); |
|
|
|
|
|
|
|
} else if (api_type == "XYQ") { |
|
|
|
|
|
|
|
if (extdata["搜索请求头参数"]) { |
|
|
|
|
|
|
|
if (extdata["搜索请求头参数"].includes('#') || extdata["搜索请求头参数"].includes('$')) { |
|
|
|
|
|
|
|
extdata["搜索请求头参数"].split('#').forEach(v => { |
|
|
|
|
|
|
|
headers[v.split('$')[0]] = v.split('$')[1]; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
headers["User-Agent"] = extdata["搜索请求头参数"] || headers["User-Agent"]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
headers["User-Agent"] = (headers["User-Agent"] == "电脑" || headers["User-Agent"] == "PC_UA") ? PC_UA : MOBILE_UA; |
|
|
|
|
|
|
|
ssurl = extdata["搜索链接"].replace('{wd}', name).replace('{pg}', MY_PAGE); |
|
|
|
|
|
|
|
if (extdata["POST请求数据"] != "") { |
|
|
|
|
|
|
|
ssurl = ssurl.split(';')[0]; |
|
|
|
|
|
|
|
postdata = extdata["POST请求数据"].replace('{wd}', name).replace('{pg}', MY_PAGE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
vodurlhead = getHome(ssurl); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log('api类型错误') |
|
|
|
log('api类型错误'); |
|
|
|
|
|
|
|
return []; |
|
|
|
} |
|
|
|
} |
|
|
|
function getHtmlCode(ssurl,ua,timeout){ |
|
|
|
function getHtmlCode(ssurl, headers) { |
|
|
|
let headers = { |
|
|
|
|
|
|
|
"User-Agent": ua, |
|
|
|
|
|
|
|
"Referer": ssurl |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
let html = request(ssurl, { headers: headers, timeout: timeout }); |
|
|
|
let html = request(ssurl, { headers: headers, timeout: timeout }); |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (html.indexOf('检测中') != -1) { |
|
|
|
if (html.indexOf('检测中') != -1) { |
|
|
@ -635,13 +650,14 @@ function getSsData(name, jkdata) { |
|
|
|
|
|
|
|
|
|
|
|
let lists = []; |
|
|
|
let lists = []; |
|
|
|
let gethtml = ""; |
|
|
|
let gethtml = ""; |
|
|
|
|
|
|
|
let ssvodurl; |
|
|
|
|
|
|
|
try { |
|
|
|
if (/v1|app|iptv|v2|cms/.test(api_type)) { |
|
|
|
if (/v1|app|iptv|v2|cms/.test(api_type)) { |
|
|
|
let json; |
|
|
|
let json; |
|
|
|
try { |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
|
|
|
|
if (/cms/.test(api_type)) { |
|
|
|
if (/cms/.test(api_type)) { |
|
|
|
if (gethtml && gethtml.indexOf(name) == -1) { |
|
|
|
if (gethtml && gethtml.indexOf(name) == -1) { |
|
|
|
gethtml = getHtmlCode(ssurl.replace('videolist','list'),api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl.replace('videolist', 'list'), headers); |
|
|
|
} |
|
|
|
} |
|
|
|
if (/<\?xml/.test(gethtml)) { |
|
|
|
if (/<\?xml/.test(gethtml)) { |
|
|
|
gethtml = gethtml.replace(/<!\[CDATA\[|\]\]>|<!\[CDATA\[|\]\]>/g, ''); |
|
|
|
gethtml = gethtml.replace(/<!\[CDATA\[|\]\]>|<!\[CDATA\[|\]\]>/g, ''); |
|
|
@ -668,12 +684,7 @@ function getSsData(name, jkdata) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
json = JSON.parse(gethtml.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')); |
|
|
|
json = JSON.parse(gethtml.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
json = { data: [] }; |
|
|
|
|
|
|
|
if(gethtml){geterror = 1;} |
|
|
|
|
|
|
|
//log(1);//log(obj.name+'>'+e.message + " 错误行#" + e.lineNumber);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
lists = eval(listnode) || json.list || json.data.list || json.data || []; |
|
|
|
lists = eval(listnode) || json.list || json.data.list || json.data || []; |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
@ -682,7 +693,7 @@ function getSsData(name, jkdata) { |
|
|
|
|
|
|
|
|
|
|
|
if (lists.length == 0 && api_type == "iptv") { |
|
|
|
if (lists.length == 0 && api_type == "iptv") { |
|
|
|
ssurl = ssurl.replace('&zm=' + name, ''); |
|
|
|
ssurl = ssurl.replace('&zm=' + name, ''); |
|
|
|
json = JSON.parse(getHtmlCode(ssurl,api_ua,5000)); |
|
|
|
json = JSON.parse(getHtmlCode(ssurl, headers)); |
|
|
|
lists = json.data || []; |
|
|
|
lists = json.data || []; |
|
|
|
} |
|
|
|
} |
|
|
|
lists = lists.map(list => { |
|
|
|
lists = lists.map(list => { |
|
|
@ -701,14 +712,10 @@ function getSsData(name, jkdata) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} catch (e) { |
|
|
|
} else { |
|
|
|
//log(2);//log(obj.name+'>'+e.message);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else if(api_type=="XPath"||api_type=="biubiu"){ |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
if (api_type == "XPath") { |
|
|
|
if (api_type == "XPath") { |
|
|
|
if (extdata.scVodNode == "json:list") { |
|
|
|
if (extdata.scVodNode == "json:list") { |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
let json = JSON.parse(gethtml); |
|
|
|
let json = JSON.parse(gethtml); |
|
|
|
lists = json.list || []; |
|
|
|
lists = json.list || []; |
|
|
|
lists.forEach(item => { |
|
|
|
lists.forEach(item => { |
|
|
@ -720,14 +727,14 @@ function getSsData(name, jkdata) { |
|
|
|
let sstype = ssurl.indexOf(';post') > -1 ? "post" : "get"; |
|
|
|
let sstype = ssurl.indexOf(';post') > -1 ? "post" : "get"; |
|
|
|
if (sstype == "post") { |
|
|
|
if (sstype == "post") { |
|
|
|
let ssstr = ssurl.replace(';post', '').split('?'); |
|
|
|
let ssstr = ssurl.replace(';post', '').split('?'); |
|
|
|
let postcs = ssstr[ssstr.length-1]; |
|
|
|
postdata = ssstr[ssstr.length - 1]; |
|
|
|
if (ssstr.length > 2) { |
|
|
|
if (ssstr.length > 2) { |
|
|
|
ssstr.length = ssstr.length - 1; |
|
|
|
ssstr.length = ssstr.length - 1; |
|
|
|
} |
|
|
|
} |
|
|
|
ssurl = ssstr.join('?'); |
|
|
|
ssurl = ssstr.join('?'); |
|
|
|
gethtml = request(ssurl, { headers: { 'User-Agent': api_ua }, timeout:5000, method: 'POST', body: postcs }); |
|
|
|
gethtml = request(ssurl, { headers: headers, timeout: timeout, method: 'POST', body: postdata }); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
} |
|
|
|
} |
|
|
|
let title = xpathArray(gethtml, extdata.scVodNode + extdata.scVodName); |
|
|
|
let title = xpathArray(gethtml, extdata.scVodNode + extdata.scVodName); |
|
|
|
let href = xpathArray(gethtml, extdata.scVodNode + extdata.scVodId); |
|
|
|
let href = xpathArray(gethtml, extdata.scVodNode + extdata.scVodId); |
|
|
@ -737,11 +744,11 @@ function getSsData(name, jkdata) { |
|
|
|
lists.push({ "id": /^http/.test(href[j]) || /\{vid}$/.test(extdata.dtUrl) ? href[j] : href[j].replace(/\/.*?\/|\.html/g, ''), "name": title[j], "pic": img[j], "desc": mark[j] }) |
|
|
|
lists.push({ "id": /^http/.test(href[j]) || /\{vid}$/.test(extdata.dtUrl) ? href[j] : href[j].replace(/\/.*?\/|\.html/g, ''), "name": title[j], "pic": img[j], "desc": mark[j] }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
var ssvodurl = `extdata.dtUrl.replace('{vid}', list.id)`; |
|
|
|
ssvodurl = `extdata.dtUrl.replace('{vid}', list.id)`; |
|
|
|
}else{ |
|
|
|
} else if(api_type == "biubiu"){ |
|
|
|
ssurl = extdata.url + extdata.sousuoqian + name + extdata.sousuohou; |
|
|
|
ssurl = extdata.url + extdata.sousuoqian + name + extdata.sousuohou; |
|
|
|
if (extdata.ssmoshi == "0") { |
|
|
|
if (extdata.ssmoshi == "0") { |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
let html = JSON.parse(gethtml); |
|
|
|
let html = JSON.parse(gethtml); |
|
|
|
lists = html.list || []; |
|
|
|
lists = html.list || []; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -753,10 +760,10 @@ function getSsData(name, jkdata) { |
|
|
|
if(ssstr.length>2){ |
|
|
|
if(ssstr.length>2){ |
|
|
|
ssstr.length = ssstr.length-1; |
|
|
|
ssstr.length = ssstr.length-1; |
|
|
|
} |
|
|
|
} |
|
|
|
var gethtml = request(ssurl, { headers: { 'User-Agent': api_ua }, timeout:5000, method: 'POST', body: postcs }); |
|
|
|
var gethtml = request(ssurl, { headers: headers, timeout:timeout, method: 'POST', body: postcs }); |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
} |
|
|
|
} |
|
|
|
let sslist = gethtml.split(extdata.jiequshuzuqian.replace(/\\/g, "")); |
|
|
|
let sslist = gethtml.split(extdata.jiequshuzuqian.replace(/\\/g, "")); |
|
|
|
sslist.splice(0, 1); |
|
|
|
sslist.splice(0, 1); |
|
|
@ -770,38 +777,21 @@ function getSsData(name, jkdata) { |
|
|
|
} |
|
|
|
} |
|
|
|
if (extdata.sousuohouzhui == "/vod/") { extdata.sousuohouzhui = "/index.php/vod/detail/id/" } |
|
|
|
if (extdata.sousuohouzhui == "/vod/") { extdata.sousuohouzhui = "/index.php/vod/detail/id/" } |
|
|
|
} |
|
|
|
} |
|
|
|
var ssvodurl = `extdata.url+extdata.sousuohouzhui+list.id`;//+'.html'
|
|
|
|
ssvodurl = `extdata.url+extdata.sousuohouzhui+list.id`;//+'.html'
|
|
|
|
} |
|
|
|
|
|
|
|
lists = lists.map(list=>{ |
|
|
|
|
|
|
|
let vodname = list.name; |
|
|
|
|
|
|
|
let vodpic = list.pic||""; |
|
|
|
|
|
|
|
let voddesc = list.desc||""; |
|
|
|
|
|
|
|
let vodurl = eval(ssvodurl); |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
vodname: vodname, |
|
|
|
|
|
|
|
vodpic: vodpic, |
|
|
|
|
|
|
|
voddesc: voddesc, |
|
|
|
|
|
|
|
vodurl: vodurl |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
//log(3);//log(obj.name+'>'+e.message);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else if (api_type=="XBPQ"){ |
|
|
|
}else if (api_type=="XBPQ"){ |
|
|
|
try{ |
|
|
|
|
|
|
|
if (extdata["搜索模式"] == "0" && extdata["搜索后缀"]) { |
|
|
|
if (extdata["搜索模式"] == "0" && extdata["搜索后缀"]) { |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
let html = JSON.parse(gethtml); |
|
|
|
let html = JSON.parse(gethtml); |
|
|
|
lists = html.list || []; |
|
|
|
lists = html.list || []; |
|
|
|
var ssvodurl = `extdata["主页url"] + extdata["搜索后缀"] + list.id + '.html'`; |
|
|
|
ssvodurl = `extdata["主页url"] + extdata["搜索后缀"] + list.id + '.html'`; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
let sstype = ssurl.indexOf(';post') > -1 ? "post" : "get"; |
|
|
|
let sstype = ssurl.indexOf(';post') > -1 ? "post" : "get"; |
|
|
|
if (sstype == "post") { |
|
|
|
if (sstype == "post") { |
|
|
|
let postcs = ssurl.split(';')[2]; |
|
|
|
let postcs = ssurl.split(';')[2]; |
|
|
|
ssurl = ssurl.split(';')[0]; |
|
|
|
ssurl = ssurl.split(';')[0]; |
|
|
|
gethtml = request(ssurl, { headers: { 'User-Agent': api_ua }, timeout:5000, method: 'POST', body: postcs }); |
|
|
|
gethtml = request(ssurl, { headers: headers, timeout: timeout, method: 'POST', body: postcs }); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gethtml = getHtmlCode(ssurl,api_ua,5000); |
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
} |
|
|
|
} |
|
|
|
if (extdata["搜索二次截取"]) { |
|
|
|
if (extdata["搜索二次截取"]) { |
|
|
|
gethtml = gethtml.split(extdata["搜索二次截取"].split('&&')[0])[1].split(extdata["搜索二次截取"].split('&&')[1])[0]; |
|
|
|
gethtml = gethtml.split(extdata["搜索二次截取"].split('&&')[0])[1].split(extdata["搜索二次截取"].split('&&')[1])[0]; |
|
|
@ -811,24 +801,57 @@ function getSsData(name, jkdata) { |
|
|
|
let title = getBetweenStr(sslist[i], extdata["搜索标题"]);//sslist[i].split(extdata["搜索标题"].split('&&')[0])[1].split(extdata["搜索标题"].split('&&')[1])[0];
|
|
|
|
let title = getBetweenStr(sslist[i], extdata["搜索标题"]);//sslist[i].split(extdata["搜索标题"].split('&&')[0])[1].split(extdata["搜索标题"].split('&&')[1])[0];
|
|
|
|
let href = getBetweenStr(sslist[i], extdata["搜索链接"].replace(`+\"id\":`, '').replace(`,+`, '.'));//sslist[i].split(extdata["搜索链接"].split('&&')[0])[1].split(extdata["搜索链接"].split('&&')[1])[0];
|
|
|
|
let href = getBetweenStr(sslist[i], extdata["搜索链接"].replace(`+\"id\":`, '').replace(`,+`, '.'));//sslist[i].split(extdata["搜索链接"].split('&&')[0])[1].split(extdata["搜索链接"].split('&&')[1])[0];
|
|
|
|
let img = getBetweenStr(sslist[i], extdata["搜索图片"]);//sslist[i].split(extdata["搜索图片"].split('&&')[0])[1].split(extdata["搜索图片"].split('&&')[1])[0];
|
|
|
|
let img = getBetweenStr(sslist[i], extdata["搜索图片"]);//sslist[i].split(extdata["搜索图片"].split('&&')[0])[1].split(extdata["搜索图片"].split('&&')[1])[0];
|
|
|
|
let mark = getBetweenStr(sslist[i], extdata["搜索副标题"]);//sslist[i].split(extdata["搜索副标题"].split('&&')[0])[1].split(extdata["搜索副标题"].split('&&')[1])[0];
|
|
|
|
let desc = getBetweenStr(sslist[i], extdata["搜索副标题"]);//sslist[i].split(extdata["搜索副标题"].split('&&')[0])[1].split(extdata["搜索副标题"].split('&&')[1])[0];
|
|
|
|
lists.push({"id":/^http/.test(href)?href:vodurlhead+href,"name":title,"pic":img,"desc":mark}) |
|
|
|
lists.push({ "id": /^http/.test(href) ? href : vodurlhead + href, "name": title, "pic": img, "desc": desc }) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ssvodurl = ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else if(api_type=="XYQ"){ |
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
if (extdata["搜索后缀"]) { |
|
|
|
|
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
|
|
|
|
let html = JSON.parse(gethtml); |
|
|
|
|
|
|
|
lists = html.list || []; |
|
|
|
|
|
|
|
ssvodurl = `extdata["主页url"] + extdata["搜索后缀"] + list.id + '.html'`; |
|
|
|
|
|
|
|
} else {*/ |
|
|
|
|
|
|
|
if (postdata) { |
|
|
|
|
|
|
|
gethtml = request(ssurl, { headers: headers, timeout: timeout, method: 'POST', body: postdata }); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
gethtml = getHtmlCode(ssurl, headers); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let sslist = pdfa(gethtml, extdata["搜索列表数组规则"]); |
|
|
|
|
|
|
|
for (let i = 0; i < sslist.length; i++) { |
|
|
|
|
|
|
|
let title,href,img,desc; |
|
|
|
|
|
|
|
if(extdata["搜索片单是否Jsoup写法"]=="1"){ |
|
|
|
|
|
|
|
title = pdfh(sslist[i], extdata["搜索片单标题"]); |
|
|
|
|
|
|
|
href = (extdata["搜索片单链接加前缀"]||"")+pdfh(sslist[i], extdata["搜索片单链接"])+(extdata["搜索片单链接加后缀"]||""); |
|
|
|
|
|
|
|
img = pdfh(sslist[i], extdata["搜索片单图片"]); |
|
|
|
|
|
|
|
desc = pdfh(sslist[i], extdata["搜索片单副标题"]); |
|
|
|
} |
|
|
|
} |
|
|
|
var ssvodurl = ""; |
|
|
|
if(href&&title){ |
|
|
|
|
|
|
|
lists.push({ "id": href, "name": title, "pic": img, "desc": desc }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ssvodurl = ""; |
|
|
|
|
|
|
|
//}
|
|
|
|
} |
|
|
|
} |
|
|
|
lists = lists.map(list => { |
|
|
|
lists = lists.map(list => { |
|
|
|
|
|
|
|
let vodname = list.name; |
|
|
|
|
|
|
|
let vodpic = list.pic || ""; |
|
|
|
|
|
|
|
let voddesc = list.desc || ""; |
|
|
|
let vodurl = ssvodurl ? eval(ssvodurl) : list.id; |
|
|
|
let vodurl = ssvodurl ? eval(ssvodurl) : list.id; |
|
|
|
return { |
|
|
|
return { |
|
|
|
vodname: list.name, |
|
|
|
vodname: vodname, |
|
|
|
vodpic: list.pic||"", |
|
|
|
vodpic: vodpic, |
|
|
|
voddesc: list.desc||"", |
|
|
|
voddesc: voddesc, |
|
|
|
vodurl: vodurl |
|
|
|
vodurl: vodurl |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}catch(e){ |
|
|
|
|
|
|
|
log(e.message + " 错误行#" + e.lineNumber); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
log(jkdata.name + ' 搜索数据报错>' + e.message + " 错误行#" + e.lineNumber); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let searchs = []; |
|
|
|
let searchs = []; |
|
|
|
if (lists.length > 0) { |
|
|
|
if (lists.length > 0) { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -837,7 +860,7 @@ function getSsData(name, jkdata) { |
|
|
|
if (/^\/\//.test(vodpic)) { |
|
|
|
if (/^\/\//.test(vodpic)) { |
|
|
|
vodpic = "https:" + vodpic; |
|
|
|
vodpic = "https:" + vodpic; |
|
|
|
} |
|
|
|
} |
|
|
|
if(/^\/upload|^upload/.test(vodpic)){ |
|
|
|
if (/^\/|^upload/.test(vodpic)) { |
|
|
|
vodpic = vodurl.match(/http(s)?:\/\/(.*?)\//)[0] + vodpic; |
|
|
|
vodpic = vodurl.match(/http(s)?:\/\/(.*?)\//)[0] + vodpic; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -881,7 +904,7 @@ function getErData(jkdata) { |
|
|
|
extdata = extDataCache(jkdata) |
|
|
|
extdata = extDataCache(jkdata) |
|
|
|
if (api_type == "XYQ") { |
|
|
|
if (api_type == "XYQ") { |
|
|
|
if (extdata["请求头参数"]) { |
|
|
|
if (extdata["请求头参数"]) { |
|
|
|
if(extdata["请求头参数"].includes('#')){ |
|
|
|
if (extdata["请求头参数"].includes('#') || extdata["请求头参数"].includes('$')) { |
|
|
|
extdata["请求头参数"].split('#').forEach(v => { |
|
|
|
extdata["请求头参数"].split('#').forEach(v => { |
|
|
|
headers[v.split('$')[0]] = v.split('$')[1]; |
|
|
|
headers[v.split('$')[0]] = v.split('$')[1]; |
|
|
|
}) |
|
|
|
}) |
|
|
|