Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小马网络
dr_py
提交
8b148488
dr_py
项目概览
小马网络
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8b148488
编写于
9月 23, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优酷搜索完成
上级
67959409
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
4 deletion
+22
-4
js/优酷.js
js/优酷.js
+3
-2
libs/pre.js
libs/pre.js
+0
-2
py/优酷搜索.js
py/优酷搜索.js
+19
-0
未找到文件。
js/优酷.js
浏览文件 @
8b148488
...
...
@@ -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
libs/pre.js
浏览文件 @
8b148488
...
...
@@ -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
''
}
...
...
py/优酷搜索.js
0 → 100644
浏览文件 @
8b148488
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录