diff --git "a/js/\344\274\230\351\205\267.js" "b/js/\344\274\230\351\205\267.js" index cbbff9cb9afe5c91b8b6143031e295abd808118a..3471b4c4c8522a17bb49e7c7fec259fd5c48617d 100644 --- "a/js/\344\274\230\351\205\267.js" +++ "b/js/\344\274\230\351\205\267.js" @@ -2,7 +2,7 @@ var rule = { title:'优酷', host:'https://www.%79%6f%75%6b%75.com', homeUrl:'', - searchUrl:'', + searchUrl:'https://search.%79%6f%75%6b%75.com/api/search?pg=fypage&keyword=**', searchable:2, quickSearch:0, filterable:1, @@ -32,5 +32,5 @@ var rule = { 二级:'', 二级:'js:var d=[];var vod={vod_id:input};let html=request(input);let json=JSON.parse(html);if(/keyword/.test(input)){input="https://search.youku.com/api/search?appScene=show_episode&showIds="+json.pageComponentList[0].commonData.showId;json=JSON.parse(fetch(MY_URL,fetch_params))}let video_lists=json.serisesList;var name=json.sourceName;if(/优酷/.test(name)&&video_lists.length>0){let ourl="https://v.youku.com/v_show/id_"+video_lists[0].videoId+".html";let _img=video_lists[0].thumbUrl;let html=fetch(ourl,{headers:{Referer:"https://v.youku.com/","User-Agent":PC_UA}});let json=/__INITIAL_DATA__/.test(html)?html.split("window.__INITIAL_DATA__ =")[1].split(";")[0]:"{}";if(json==="{}"){log("触发了优酷人机验证");vod.vod_remarks=ourl;vod.vod_pic=_img;vod.vod_name=video_lists[0].title.replace(/(\\d+)/g,"");vod.vod_content="触发了优酷人机验证,本次未获取详情,但不影响播放("+ourl+")"}else{try{json=JSON.parse(json);let data=json.data.data;let data_extra=data.data.extra;let img=data_extra.showImgV;let model=json.data.model;let m=model.detail.data.nodes[0].nodes[0].nodes[0].data;let _type=m.showGenre;let _desc=m.updateInfo||m.subtitle;let JJ=m.desc;let _title=m.introTitle;vod.vod_pic=img;vod.vod_name=_title;vod.vod_type=_type;vod.vod_remarks=_desc;vod.vod_content=JJ}catch(e){log("海报渲染发生错误:"+e.message);vod.vod_remarks=name}}}if(!/优酷/.test(name)){vod.vod_content="非自家播放源,暂无视频简介及海报";vod.vod_remarks=name}function adhead(url){return urlencode(url)}play_url=play_url.replace("&play_url=","&type=json&play_url=");video_lists.forEach(function(it){let url="https://v.youku.com/v_show/id_"+it.videoId+".html";if(it.thumbUrl){d.push({desc:it.showVideoStage?it.showVideoStage.replace("期","集"):it.displayName,pic_url:it.thumbUrl,title:it.title,url:play_url+adhead(url)})}else if(name!=="优酷"){d.push({title:it.displayName?it.displayName:it.title,url:play_url+adhead(it.url)})}});vod.vod_play_from=name;vod.vod_play_url=d.map(function(it){return it.title+"$"+it.url}).join("#");', 搜索:'', - 搜索:'js:let d=[];let html=request(input);let jsonA=JSON.parse(html.match(/INITIAL_STATE.*?({.*});/)[1]);jsonA=jsonA.result.longVideo.results;jsonA.forEach(function(it){let name=it.name;let introduction=it.introduction;let pic=it.v_picurl;let url=it.tiny_url;let zone=it.zone;let score=it.score||"暂无";let style=it.style;if(it.play.item_list){let r={};r.title=name.replace(//,"").replace(//,"");r.url="https://v.sogou.com"+url;r.desc=it.list_category.join(",");r.content=introduction;r.pic_url=pic;d.push(r)}});setResult(d);', + 搜索:'js:var d=[];let html=request(input);let json=JSON.parse(html);json.pageComponentList.forEach(function(it){if(it.hasOwnProperty("commonData")){it=it.commonData;d.push({title:it.titleDTO.displayName,img:it.posterDTO.vThumbUrl,desc:it.stripeBottom,content:it.updateNotice+" "+it.feature,url:"https://search.youku.com/api/search?appScene=show_episode&showIds="+it.showId+"&appCaller=h5"})}});setResult(d);', } \ No newline at end of file diff --git a/libs/pre.js b/libs/pre.js index 71f1f60de69119e19e6fe19e9a6fb0fc77332eb6..14e1f00a0dcb039ccd36c8c0de1bf0ad23b78338 100644 --- a/libs/pre.js +++ b/libs/pre.js @@ -221,7 +221,6 @@ function maoss(jxurl, ref, key) { function request(url,obj){ // obj = obj||{'user-agent': MOBILE_UA}; - print('224'); let new_obj; if(typeof(fetch_params)!=='undefined'){ new_obj = obj?Object.assign(fetch_params,obj):fetch_params; @@ -242,7 +241,6 @@ function request(url,obj){ } return html } - print('245'); return '' } diff --git "a/py/\344\274\230\351\205\267\346\220\234\347\264\242.js" "b/py/\344\274\230\351\205\267\346\220\234\347\264\242.js" new file mode 100644 index 0000000000000000000000000000000000000000..cea8b67a884bf18d648547254ba7a625b591166a --- /dev/null +++ "b/py/\344\274\230\351\205\267\346\220\234\347\264\242.js" @@ -0,0 +1,18 @@ +js: +var d = []; +let html=request(input); +let json = JSON.parse(html); +json.pageComponentList.forEach(function (it){ + if (it.hasOwnProperty('commonData')) { + it = it.commonData; + d.push({ + title: it.titleDTO.displayName, + img: it.posterDTO.vThumbUrl, + // desc: it.feature, + desc: it.stripeBottom, + content: it.updateNotice+' '+it.feature, + url: 'https://search.youku.com/api/search?appScene=show_episode&showIds=' + it.showId + '&appCaller=h5' + }); + } +}); +setResult(d); \ No newline at end of file