diff --git "a/js/\345\223\224\345\223\251\347\233\264\346\222\255.js" "b/js/\345\223\224\345\223\251\347\233\264\346\222\255.js" index a5d4db93392f14ed76c063e8f64fc2c8e64c4457..a801d7b425047c6560f74a5ad45758f323574301 100644 --- "a/js/\345\223\224\345\223\251\347\233\264\346\222\255.js" +++ "b/js/\345\223\224\345\223\251\347\233\264\346\222\255.js" @@ -1,12 +1,21 @@ -// 道长 drpy仓库 https://gitcode.net/qq_32394351/dr_py -// 道长 drpy安卓本地搭建说明 https://gitcode.net/qq_32394351/dr_py/-/blob/master/%E5%AE%89%E5%8D%93%E6%9C%AC%E5%9C%B0%E6%90%AD%E5%BB%BA%E8%AF%B4%E6%98%8E.md -// 道长 drpy写源 模板规则说明 https://gitcode.net/supertlo/dr_py#%E6%A8%A1%E6%9D%BF%E8%A7%84%E5%88%99%E8%AF%B4%E6%98%8E -// 道长 drpy写源 套模模版 https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/%E6%A8%A1%E6%9D%BF.js -// 道长 drpy写源 影片教程 http://101.34.67.237:5244/%E6%95%99%E8%82%B2/drpy -// 道长 drpy写源 影片教程(m3u8切片) https://freedrpy.run.goorm.io/txt/jc/playlist.m3u8 -// 海阔下载 https://haikuo.lanzoui.com/u/GoldRiver -// Pluto Player官方TG https://t.me/PlutoPlayer -// Pluto Player官方TG https://t.me/PlutoPlayerChannel +/* 直播弹幕 -> vod_area:'bililivedanmu' +目前只有皮皮虾大佬的DMBox, 支持弹幕 +DMBox下载:https://t.me/pipixiawerun +设置 > 窗口预览 > 开启 +*/ + +/* Cookie设置 +Cookie获取方法 https://github.com/UndCover/PyramidStore/blob/main/list.md#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9 + +Cookie设置方法1: DR-PY 后台管理界面 +CMS后台管理 > 设置中心 > 环境变量 > {"bili_cookie":"XXXXXXX","vmid":"XXXXXX"} > 保存 + +Cookie设置方法2: 手动替换Cookie +底下代码 headers的 +"Cookie":"$bili_cookie" +手动替换为 +"Cookie":"将获取的Cookie黏贴在这" +*/ var rule = { title:'哔哩直播', @@ -43,24 +52,27 @@ var rule = { }, detailUrl:'https://live.bilibili.com/fyid',//二级详情拼接链接(json格式用) // detailUrl:'https://api.live.bilibili.com/xlive/web-room/v1/playUrl/playUrl?cid=fyid&platform=h5&otype=json&quality=0',//二级详情拼接链接(json格式用) - searchUrl:'/x/web-interface/search/type?__refresh__=true&page=fypage&page_size=42&order=online&platform=pc&highlight=1&single_column=0&keyword=**&search_type=live&dynamic_offset=0&preload=true', + // searchUrl:'/x/web-interface/search/type?__refresh__=true&page=fypage&page_size=42&order=online&platform=pc&highlight=1&single_column=0&keyword=**&search_type=live&dynamic_offset=0&preload=true', + searchUrl:'https://api.bilibili.com/x/web-interface/search/type?search_type=live&keyword=**&page=1', searchable:2, quickSearch:0, headers:{ - "User-Agent":"PC_UA" - //"Cookie": "" - // Cookie获取方法 https://github.com/UndCover/PyramidStore/blob/main/list.md#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9 + "User-Agent":"PC_UA", + "Referer": "https://www.bilibili.com", + "Cookie":"$bili_cookie" }, timeout:5000, limit:8, play_parse:true, // play_json:[{re:'*', json:{jx:0, parse:1,header:JSON.stringify({"user-agent":"Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36"})}}], - play_json:[{re:'*', json:{jx:0, parse:1,header:JSON.stringify({"user-agent":"uc_ua"})}}], + // play_json:[{re:'*', json:{jx:0, parse:1,header:JSON.stringify({"user-agent":"uc_ua"})}}], // play_json:0, - lazy:'', + lazy:"js:let ids=input.split('_');let result={};let iurl='https://api.live.bilibili.com/room/v1/Room/playUrl?cid='+ids[1]+'&'+ids[0];let html=request(iurl);let jRoot=JSON.parse(html);let jo=jRoot['data'];let ja=jo['durl'];let purl='';if(ja.length>0){purl=ja[0]['url']}result['parse']=0;result['playUrl']='';result['url']=unescape(purl);result['header']={Referer:'https://live.bilibili.com','User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'};if(/h5/.test(ids[0])){result['contentType']='';input=result}else{result['contentType']='video/x-flv';input=result}", double:false, 推荐:'*', 一级:'json:data.list;title;system_cover;uname;roomid', - 二级:'*', - 搜索:'json:data.result.live_room;*;cover;*;*', + // 二级:'*', + 二级:"js:let aid=input.match(/\\/(\\d+)/)[1];log(aid);let html=request('https://api.live.bilibili.com/room/v1/Room/get_info?room_id='+aid);let jo=JSON.parse(html).data;let title=jo['title'];let pic=jo['keyframe'];let desc=jo['description'];let dire=jo['uid'];let typeName=jo['area_name'];let remark='在线人数:'+jo['online'];let vod={vod_id:aid,vod_name:title,vod_pic:pic,type_name:typeName,vod_area:'bililivedanmu',vod_remarks:remark,vod_actor:'直播间id-'+aid,vod_director:dire,vod_content:desc};vod['vod_play_from']='B站';vod['vod_play_url']='flv线路原画$platform=web&quality=4_'+aid+'#flv线路高清$platform=web&quality=3_'+aid+'#h5线路原画$platform=h5&quality=4_'+aid+'#h5线路高清$platform=h5&quality=3_'+aid;VOD=vod;", + // 搜索:'json:data.result.live_room;title;cover;uname;roomid', + 搜索:'js:let html=request(input);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 videos=[];let vodList=JSON.parse(html).data.result.live_room;vodList.forEach(function(vod){let aid=vod["roomid"];let title="直播间:"+vod["title"].replace(\'\',"").replace("","");let img="https:"+vod["user_cover"];let remark=vod["watched_show"]["text_small"]+" "+vod["uname"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos}', } \ No newline at end of file