Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxaah
dr_py
提交
e37e7eb9
dr_py
项目概览
sxaah
/
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,发现更多精彩内容 >>
提交
e37e7eb9
编写于
12月 02, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善哔哩
上级
d086408a
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
145 addition
and
4 deletion
+145
-4
js/version.txt
js/version.txt
+1
-1
js/哔哩影视.js
js/哔哩影视.js
+19
-3
py/哔哩二级.js
py/哔哩二级.js
+51
-0
py/哔哩免嗅.js
py/哔哩免嗅.js
+38
-0
py/哔哩搜索.js
py/哔哩搜索.js
+35
-0
readme.md
readme.md
+1
-0
未找到文件。
js/version.txt
浏览文件 @
e37e7eb9
3.9.28beta1
\ No newline at end of file
3.9.28beta2
\ No newline at end of file
js/哔哩影视.js
浏览文件 @
e37e7eb9
...
...
@@ -5,7 +5,7 @@ var rule = {
detailUrl
:
'
/pgc/view/web/season?season_id=fyid
'
,
filter_url
:
'
fl={{fl}}
'
,
vmid获取教程
:
'
登录后访问https://api.bilibili.com/x/web-interface/nav,搜索mid就是,cookie需要 bili_jct,DedeUserID,SESSDATA参数
'
,
searchUrl
:
'
/
index.php?m=vod-search#wd=**&search=;post
'
,
searchUrl
:
'
/
x/web-interface/search/type?keyword=**&search_type=
'
,
searchable
:
1
,
filterable
:
1
,
quickSearch
:
0
,
...
...
@@ -26,6 +26,21 @@ var rule = {
推荐
:
'
js:let d=[];function get_result(url){let videos=[];let html=request(url);let jo=JSON.parse(html);if(jo["code"]===0){let vodList=jo.result?jo.result.list:jo.data.list;vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let remark=vod.new_ep?vod["new_ep"]["index_show"]:vod["index_show"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})})}return videos}function get_rank(tid,pg){return get_result("https://api.bilibili.com/pgc/web/rank/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function get_rank2(tid,pg){return get_result("https://api.bilibili.com/pgc/season/rank/web/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function home_video(){let videos=get_rank(1).slice(0,5);[4,2,5,3,7].forEach(function(i){videos=videos.concat(get_rank2(i).slice(0,5))});return videos}VODS=home_video();
'
,
一级
:
''
,
一级
:
'
js:let d=[];let vmid=input.split("vmid=")[1].split("&")[0];function get_result(url){let videos=[];let html=request(url);let jo=JSON.parse(html);if(jo["code"]===0){let vodList=jo.result?jo.result.list:jo.data.list;vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let remark=vod.new_ep?vod["new_ep"]["index_show"]:vod["index_show"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})})}return videos}function get_rank(tid,pg){return get_result("https://api.bilibili.com/pgc/web/rank/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function get_rank2(tid,pg){return get_result("https://api.bilibili.com/pgc/season/rank/web/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function get_zhui(pg,mode){let url="https://api.bilibili.com/x/space/bangumi/follow/list?type="+mode+"&follow_status=0&pn="+pg+"&ps=10&vmid="+vmid;return get_result(url)}function get_all(tid,pg,order,season_status){let url="https://api.bilibili.com/pgc/season/index/result?order="+order+"&pagesize=20&type=1&season_type="+tid+"&page="+pg+"&season_status="+season_status;return get_result(url)}function get_timeline(tid,pg){let videos=[];let url="https://api.bilibili.com/pgc/web/timeline/v2?season_type="+tid+"&day_before=2&day_after=4";let html=request(url);let jo=JSON.parse(html);if(jo["code"]===0){let videos1=[];let vodList=jo.result.latest;vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let remark=vod["pub_index"]+" "+vod["follows"].replace("系列","");videos1.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});let videos2=[];for(let i=0;i<7;i++){let vodList=jo["result"]["timeline"][i]["episodes"];vodList.forEach(function(vod){if(vod["published"]+""==="0"){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let date=vod["pub_ts"];let remark=date+" "+vod["pub_index"];videos2.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})}})}videos=videos2.concat(videos1)}return videos}function cate_filter(d,cookie){if(MY_CATE==="1"){return get_rank(MY_CATE,MY_PAGE)}else if(["2","3","4","5","7"].includes(MY_CATE)){return get_rank2(MY_CATE,MY_PAGE)}else if(MY_CATE==="全部"){let tid=MY_FL.tid||"1";let order=MY_FL.order||"2";let season_status=MY_FL.season_status||"-1";return get_all(tid,MY_PAGE,order,season_status)}else if(MY_CATE==="追番"){return get_zhui(MY_PAGE,1)}else if(MY_CATE==="追剧"){return get_zhui(MY_PAGE,2)}else if(MY_CATE==="时间表"){let tid=MY_FL.tid||"1";return get_timeline(tid,MY_PAGE)}else{return[]}}VODS=cate_filter();
'
,
二级
:{
is_json
:
true
,
title
:
"
.result.title;.result.share_sub_title
"
,
"
img
"
:
"
.result.cover
"
,
"
desc
"
:
"
.result.new_ep.desc;.result.publish.pub_time;.result.subtitle
"
,
"
content
"
:
"
.result.evaluate
"
,
"
tabs
"
:
"
js:pdfa=jsp.pdfa;TABS=['B站']
"
,
"
lists
"
:
"
.episodes
"
},
搜索
:
'
ul.tbox_m li;*;*;*;*
'
,
二级
:{
is_json
:
true
,
title
:
"
.result.title;.result.share_sub_title
"
,
img
:
"
.result.cover
"
,
desc
:
"
.result.new_ep.desc;.result.publish.pub_time;.result.subtitle
"
,
content
:
"
.result.evaluate
"
,
tabs
:
"
js:pdfa=jsp.pdfa;TABS=['B站']
"
,
lists
:
"
.result.episodes
"
,
list_text
:
'
title
'
,
list_url
:
'
cid
'
,
},
二级
:
''
,
二级
:
'
js:function zh(num){let p="";if(Number(num)>1e8){p=(num/1e8).toFixed(2)+"亿"}else if(Number(num)>1e4){p=(num/1e4).toFixed(2)+"万"}else{p=num}return p}let html=request(input);let jo=JSON.parse(html).result;let id=jo["season_id"];let title=jo["title"];let pic=jo["cover"];let areas=jo["areas"][0]["name"];let typeName=jo["share_sub_title"];let date=jo["publish"]["pub_time"].substr(0,4);let dec=jo["evaluate"];let remark=jo["new_ep"]["desc"];let stat=jo["stat"];let status="弹幕: "+zh(stat["danmakus"])+" 点赞: "+zh(stat["likes"])+" 投币: "+zh(stat["coins"])+" 追番追剧: "+zh(stat["favorites"]);let score=jo.hasOwnProperty("rating")?"评分: "+jo["rating"]["score"]+" "+jo["subtitle"]:"暂无评分"+" "+jo["subtitle"];let vod={vod_id:id,vod_name:title,vod_pic:pic,type_name:typeName,vod_year:date,vod_area:areas,vod_remarks:remark,vod_actor:status,vod_director:score,vod_content:dec};let ja=jo["episodes"];let playurls=[];ja.forEach(function(tmpJo){let eid=tmpJo["id"];let cid=tmpJo["cid"];let part=tmpJo["title"].replace("#","-")+" "+tmpJo["long_title"];playurls.push(part+"$"+eid+"_"+cid)});let playUrl=playurls.join("#");vod["vod_play_from"]="B站";vod["vod_play_url"]=playUrl;VOD=vod;
'
,
搜索
:
''
,
搜索
:
'
js:let url1=input+"media_bangumi";let url2=input+"media_ft";let html=request(url1);let msg=JSON.parse(html).message;if(msg!=="0"){VODS=[{vod_name:KEY+"➢"+msg,vod_id:"no_data",vod_remarks:"别点,缺少bili_cookie",vod_pic:"https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg"}]}else{let jo1=JSON.parse(html).data;html=request(url2);let jo2=JSON.parse(html).data;let videos=[];let vodList=[];if(jo1["numResults"]===0){vodList=jo2["result"]}else if(jo2["numResults"]===0){vodList=jo1["result"]}else{vodList=jo1["result"].concat(jo2["result"])}vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=KEY+"➢"+vod["title"].trim().replace(
\'
<em class="keyword">
\'
,"").replace("</em>","");let img=vod["cover"].trim();let remark=vod["index_show"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos}
'
,
lazy
:
''
,
lazy
:
'
js:let ids=input.split("_");let result={};let url="https://api.bilibili.com/pgc/player/web/playurl?qn=116&ep_id="+ids[0]+"&cid="+ids[1];let html=request(url);let jRoot=JSON.parse(html);if(jRoot["message"]!=="success"){print("需要大会员权限才能观看");input=""}else{let jo=jRoot["result"];let ja=jo["durl"];let maxSize=-1;let position=-1;ja.forEach(function(tmpJo,i){if(maxSize<Number(tmpJo["size"])){maxSize=Number(tmpJo["size"]);position=i}});let url="";if(ja.length>0){if(position===-1){position=0}url=ja[position]["url"]}result["parse"]=0;result["playUrl"]="";result["url"]=url;result["header"]={Referer:"https://www.bilibili.com","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"};result["contentType"]="video/x-flv";input=result}
'
,
}
\ No newline at end of file
py/哔哩二级.js
0 → 100644
浏览文件 @
e37e7eb9
js
:
// 将超过10000的数字换成成以万和亿为单位
function
zh
(
num
){
let
p
=
''
;
if
(
Number
(
num
)
>
100000000
){
p
=
(
num
/
100000000
).
toFixed
(
2
)
+
'
亿
'
;
}
else
if
(
Number
(
num
)
>
10000
){
p
=
(
num
/
10000
).
toFixed
(
2
)
+
'
万
'
;
}
else
{
p
=
num
;
}
return
p
}
let
html
=
request
(
input
);
let
jo
=
JSON
.
parse
(
html
).
result
;
let
id
=
jo
[
'
season_id
'
];
let
title
=
jo
[
'
title
'
];
let
pic
=
jo
[
'
cover
'
];
let
areas
=
jo
[
'
areas
'
][
0
][
'
name
'
];
let
typeName
=
jo
[
'
share_sub_title
'
];
let
date
=
jo
[
'
publish
'
][
'
pub_time
'
].
substr
(
0
,
4
);
let
dec
=
jo
[
'
evaluate
'
];
let
remark
=
jo
[
'
new_ep
'
][
'
desc
'
];
let
stat
=
jo
[
'
stat
'
];
let
status
=
"
弹幕:
"
+
zh
(
stat
[
'
danmakus
'
])
+
"
点赞:
"
+
zh
(
stat
[
'
likes
'
])
+
"
投币:
"
+
zh
(
stat
[
'
coins
'
])
+
"
追番追剧:
"
+
zh
(
stat
[
'
favorites
'
]);
let
score
=
jo
.
hasOwnProperty
(
'
rating
'
)?
"
评分:
"
+
jo
[
'
rating
'
][
'
score
'
]
+
'
'
+
jo
[
'
subtitle
'
]:
"
暂无评分
"
+
'
'
+
jo
[
'
subtitle
'
];
let
vod
=
{
"
vod_id
"
:
id
,
"
vod_name
"
:
title
,
"
vod_pic
"
:
pic
,
"
type_name
"
:
typeName
,
"
vod_year
"
:
date
,
"
vod_area
"
:
areas
,
"
vod_remarks
"
:
remark
,
"
vod_actor
"
:
status
,
"
vod_director
"
:
score
,
"
vod_content
"
:
dec
}
let
ja
=
jo
[
'
episodes
'
];
let
playurls
=
[];
ja
.
forEach
(
function
(
tmpJo
){
let
eid
=
tmpJo
[
'
id
'
];
let
cid
=
tmpJo
[
'
cid
'
];
let
part
=
tmpJo
[
'
title
'
].
replace
(
"
#
"
,
"
-
"
)
+
'
'
+
tmpJo
[
'
long_title
'
];
playurls
.
push
(
part
+
'
$
'
+
eid
+
'
_
'
+
cid
);
});
let
playUrl
=
playurls
.
join
(
'
#
'
);
vod
[
'
vod_play_from
'
]
=
'
B站
'
vod
[
'
vod_play_url
'
]
=
playUrl
VOD
=
vod
;
\ No newline at end of file
py/哔哩免嗅.js
0 → 100644
浏览文件 @
e37e7eb9
js
:
let
ids
=
input
.
split
(
'
_
'
);
let
result
=
{};
let
url
=
'
https://api.bilibili.com/pgc/player/web/playurl?qn=116&ep_id=
'
+
ids
[
0
]
+
'
&cid=
'
+
ids
[
1
];
let
html
=
request
(
url
);
let
jRoot
=
JSON
.
parse
(
html
);
if
(
jRoot
[
'
message
'
]
!==
'
success
'
){
print
(
"
需要大会员权限才能观看
"
);
input
=
''
;
}
else
{
let
jo
=
jRoot
[
'
result
'
];
let
ja
=
jo
[
'
durl
'
];
let
maxSize
=
-
1
;
let
position
=
-
1
;
ja
.
forEach
(
function
(
tmpJo
,
i
){
if
(
maxSize
<
Number
(
tmpJo
[
'
size
'
])){
maxSize
=
Number
(
tmpJo
[
'
size
'
])
position
=
i
;
}
});
let
url
=
''
;
if
(
ja
.
length
>
0
){
if
(
position
===
-
1
){
position
=
0
;
}
url
=
ja
[
position
][
'
url
'
];
}
result
[
"
parse
"
]
=
0
;
result
[
"
playUrl
"
]
=
''
;
result
[
"
url
"
]
=
url
;
result
[
"
header
"
]
=
{
"
Referer
"
:
"
https://www.bilibili.com
"
,
"
User-Agent
"
:
"
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
"
};
result
[
"
contentType
"
]
=
'
video/x-flv
'
;
input
=
result
;
}
\ No newline at end of file
py/哔哩搜索.js
0 → 100644
浏览文件 @
e37e7eb9
js
:
let
url1
=
input
+
'
media_bangumi
'
;
let
url2
=
input
+
'
media_ft
'
;
let
html
=
request
(
url1
);
let
msg
=
JSON
.
parse
(
html
).
message
;
if
(
msg
!==
'
0
'
){
VODS
=
[{
vod_name
:
KEY
+
'
➢
'
+
msg
,
vod_id
:
'
no_data
'
,
vod_remarks
:
'
别点,缺少bili_cookie
'
,
vod_pic
:
'
https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg
'
}];
}
else
{
let
jo1
=
JSON
.
parse
(
html
).
data
;
html
=
request
(
url2
);
let
jo2
=
JSON
.
parse
(
html
).
data
;
let
videos
=
[];
let
vodList
=
[];
if
(
jo1
[
'
numResults
'
]
===
0
)
{
vodList
=
jo2
[
'
result
'
];
}
else
if
(
jo2
[
'
numResults
'
]
===
0
)
{
vodList
=
jo1
[
'
result
'
];
}
else
{
vodList
=
jo1
[
'
result
'
].
concat
(
jo2
[
'
result
'
]);
}
vodList
.
forEach
(
function
(
vod
)
{
let
aid
=
(
vod
[
'
season_id
'
]
+
''
).
trim
();
let
title
=
KEY
+
'
➢
'
+
vod
[
'
title
'
].
trim
().
replace
(
"
<em class=
\"
keyword
\"
>
"
,
""
).
replace
(
"
</em>
"
,
""
);
let
img
=
vod
[
'
cover
'
].
trim
();
let
remark
=
vod
[
'
index_show
'
];
videos
.
push
({
"
vod_id
"
:
aid
,
"
vod_name
"
:
title
,
"
vod_pic
"
:
img
,
"
vod_remarks
"
:
remark
});
});
VODS
=
videos
;
}
\ No newline at end of file
readme.md
浏览文件 @
e37e7eb9
...
...
@@ -55,6 +55,7 @@
{
"1"
:
1
,
"2"
:
1
,
"3"
:
1
,
"4"
:
1
,
"5"
:
1
,
"7"
:
1
,
"时间表"
:
1
}
```
-
[X] 增加分类api无数据时显示一条提示数据防止软件无限请求
-
[X] 完善哔哩影视(drpy),共有两个环境变量 vmid,bili_cookie 需要自行设置,否则无法正常播放和搜索
###### 2022/11/30
-
[X] 修复哔哩zb,jrkan zb无法播放问题
###### 2022/11/29
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录