教育大全1.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /* 直播弹幕 -> vod_area:'bilidanmu'
  2. 目前只有皮皮虾大佬的DMBox, 支持弹幕
  3. DMBox下载:https://t.me/pipixiawerun
  4. 设置 > 窗口预览 > 开启
  5. */
  6. /* Cookie设置
  7. Cookie改为预设获取蜂蜜大佬Github的
  8. https://github.com/FongMi/CatVodSpider/raw/main/txt/cookie.txt
  9. Cookie获取方法
  10. https://github.com/UndCover/PyramidStore/blob/main/list.md#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9
  11. Cookie设置方法1: DR-PY 后台管理界面
  12. CMS后台管理 > 设置中心 > 环境变量 > {"bili_cookie":"XXXXXXX","vmid":"XXXXXX"} > 保存
  13. Cookie设置方法2: 手动替换Cookie
  14. 底下代码 headers的
  15. "Cookie":"$bili_cookie"
  16. 手动替换为
  17. "Cookie":"将获取的Cookie黏贴在这"
  18. */
  19. var rule = {
  20. title:'我的哔哩',
  21. host:'https://api.bilibili.com',
  22. homeUrl:'/x/web-interface/search/type?search_type=video&keyword=小姐姐4K&page=1',
  23. url:'/x/web-interface/search/type?search_type=videofyfilter',
  24. class_name:'幼儿教育&小学教育&初中教育&高中教育',
  25. class_url:'幼儿教育&小学教育&初中教育&高中教育',
  26. filterable: 1,
  27. filter_url: '&keyword={{fl.tid}}&page=fypage&duration={{fl.duration}}&order={{fl.order}}',
  28. filter_def:{
  29. 幼儿教育:{tid:'幼儿教育'},
  30. 小学教育:{tid:'小学教育'},
  31. 初中教育:{tid:'初中教育'},
  32. 高中教育:{tid:'高中教育'}
  33. },
  34. filter: {
  35. "幼儿教育":[
  36. {"key":"order","name":"排序","value":[
  37. {"n":"综合排序","v":"0"},
  38. {"n":"最多点击","v":"click"},
  39. {"n":"最新发布","v":"pubdate"},
  40. {"n":"最多弹幕","v":"dm"},
  41. {"n":"最多收藏","v":"stow"}
  42. ]
  43. },
  44. {"key":"tid","name":"分类","value":[
  45. {"n":"全部","v":"幼儿教育"},
  46. {"n":"教育","v":"儿童教育"},
  47. {"n":"歌曲","v":"儿童歌曲"},
  48. {"n":"舞蹈","v":"儿童舞蹈"},
  49. {"n":"成语故事","v":"儿童成语故事"},
  50. {"n":"音乐","v":"儿童音乐"},
  51. {"n":"儿童MV","v":"儿童MV"},
  52. {"n":"贝乐虎","v":"贝乐虎"},
  53. {"n":"宝宝巴士","v":"宝宝巴士"},
  54. {"n":"儿童好声音","v":"儿童好声音"}
  55. ]
  56. },
  57. {"key":"duration","name":"时长","value":[
  58. {"n":"全部","v":"0"},
  59. {"n":"60分钟以上","v":"4"},
  60. {"n":"30~60分钟","v":"3"},
  61. {"n":"10~30分钟","v":"2"},
  62. {"n":"10分钟以下","v":"1"}]}],
  63. "小学教育":[
  64. {"key":"order","name":"排序","value":[
  65. {"n":"综合排序","v":"0"},
  66. {"n":"最多点击","v":"click"},
  67. {"n":"最新发布","v":"pubdate"},
  68. {"n":"最多弹幕","v":"dm"},
  69. {"n":"最多收藏","v":"stow"}
  70. ]
  71. },
  72. {"key":"tid","name":"分类","value":[
  73. {"n":"全部","v":"小学教育"},
  74. {"n":"1年级语文","v":"1年级语文"},
  75. {"n":"1年级数学","v":"1年级数学"},
  76. {"n":"1年级英语","v":"1年级英语"},
  77. {"n":"2年级语文","v":"2年级语文"},
  78. {"n":"2年级数学","v":"2年级数学"},
  79. {"n":"2年级英语","v":"2年级英语"},
  80. {"n":"3年级语文","v":"3年级语文"},
  81. {"n":"3年级数学","v":"3年级数学"},
  82. {"n":"3年级英语","v":"3年级英语"},
  83. {"n":"4年级语文","v":"4年级语文"},
  84. {"n":"4年级数学","v":"4年级数学"},
  85. {"n":"4年级英语","v":"4年级英语"},
  86. {"n":"5年级语文","v":"5年级语文"},
  87. {"n":"5年级数学","v":"5年级数学"},
  88. {"n":"5年级英语","v":"5年级英语"},
  89. {"n":"6年级语文","v":"6年级语文"},
  90. {"n":"6年级数学","v":"6年级数学"},
  91. {"n":"6年级英语","v":"6年级英语"},
  92. {"n":"小学信息技术","v":"小学信息技术"}
  93. ]
  94. },
  95. {"key":"duration","name":"时长","value":[
  96. {"n":"全部","v":"0"},
  97. {"n":"60分钟以上","v":"4"},
  98. {"n":"30~60分钟","v":"3"},
  99. {"n":"10~30分钟","v":"2"},
  100. {"n":"10分钟以下","v":"1"}]}],
  101. "初中教育":[
  102. {"key":"order","name":"排序","value":[
  103. {"n":"综合排序","v":"0"},
  104. {"n":"最多点击","v":"click"},
  105. {"n":"最新发布","v":"pubdate"},
  106. {"n":"最多弹幕","v":"dm"},
  107. {"n":"最多收藏","v":"stow"}
  108. ]
  109. },
  110. {"key":"tid","name":"分类","value":[
  111. {"n":"全部","v":"初中教育"},
  112. {"n":"初一语文","v":"初一语文"},
  113. {"n":"初一数学","v":"初一数学"},
  114. {"n":"初一英语","v":"初一英语"},
  115. {"n":"初一物理","v":"初一物理"},
  116. {"n":"初一化学","v":"初一化学"},
  117. {"n":"初一生物","v":"初一生物"},
  118. {"n":"初一政治","v":"初一政治"},
  119. {"n":"初一历史","v":"初一历史"},
  120. {"n":"初一地理","v":"初一地理"},
  121. {"n":"初二语文","v":"初二语文"},
  122. {"n":"初二数学","v":"初二数学"},
  123. {"n":"初二英语","v":"初二英语"},
  124. {"n":"初二物理","v":"初二物理"},
  125. {"n":"初二化学","v":"初二化学"},
  126. {"n":"初二生物","v":"初二生物"},
  127. {"n":"初二政治","v":"初二政治"},
  128. {"n":"初二历史","v":"初二历史"},
  129. {"n":"初二地理","v":"初二地理"},
  130. {"n":"初三语文","v":"初三语文"},
  131. {"n":"初三数学","v":"初三数学"},
  132. {"n":"初三英语","v":"初三英语"},
  133. {"n":"初三物理","v":"初三物理"},
  134. {"n":"初三化学","v":"初三化学"},
  135. {"n":"初三生物","v":"初三生物"},
  136. {"n":"初三政治","v":"初三政治"},
  137. {"n":"初三历史","v":"初三历史"},
  138. {"n":"初三地理","v":"初三地理"},
  139. {"n":"初中信息技术","v":"初中信息技术"}
  140. ]
  141. },
  142. {"key":"duration","name":"时长","value":[
  143. {"n":"全部","v":"0"},
  144. {"n":"60分钟以上","v":"4"},
  145. {"n":"30~60分钟","v":"3"},
  146. {"n":"10~30分钟","v":"2"},
  147. {"n":"10分钟以下","v":"1"}]}],
  148. "高中教育":[
  149. {"key":"order","name":"排序","value":[
  150. {"n":"综合排序","v":"0"},
  151. {"n":"最多点击","v":"click"},
  152. {"n":"最新发布","v":"pubdate"},
  153. {"n":"最多弹幕","v":"dm"},
  154. {"n":"最多收藏","v":"stow"}
  155. ]
  156. },
  157. {"key":"tid","name":"分类","value":[
  158. {"n":"全部","v":"高中教育"},
  159. {"n":"高一语文","v":"高一语文"},
  160. {"n":"高一数学","v":"高一数学"},
  161. {"n":"高一英语","v":"高一英语"},
  162. {"n":"高一物理","v":"高一物理"},
  163. {"n":"高一化学","v":"高一化学"},
  164. {"n":"高一生物","v":"高一生物"},
  165. {"n":"高一政治","v":"高一政治"},
  166. {"n":"高一历史","v":"高一历史"},
  167. {"n":"高一地理","v":"高一地理"},
  168. {"n":"高二语文","v":"高二语文"},
  169. {"n":"高二数学","v":"高二数学"},
  170. {"n":"高二英语","v":"高二英语"},
  171. {"n":"高二物理","v":"高二物理"},
  172. {"n":"高二化学","v":"高二化学"},
  173. {"n":"高二生物","v":"高二生物"},
  174. {"n":"高二政治","v":"高二政治"},
  175. {"n":"高二历史","v":"高二历史"},
  176. {"n":"高二地理","v":"高二地理"},
  177. {"n":"高三语文","v":"高三语文"},
  178. {"n":"高三数学","v":"高三数学"},
  179. {"n":"高三英语","v":"高三英语"},
  180. {"n":"高三物理","v":"高三物理"},
  181. {"n":"高三化学","v":"高三化学"},
  182. {"n":"高三生物","v":"高三生物"},
  183. {"n":"高三政治","v":"高三政治"},
  184. {"n":"高三历史","v":"高三历史"},
  185. {"n":"高三地理","v":"高三地理"},
  186. {"n":"高中信息技术","v":"高中信息技术"}
  187. ]
  188. },
  189. {"key":"duration","name":"时长","value":[
  190. {"n":"全部","v":"0"},
  191. {"n":"60分钟以上","v":"4"},
  192. {"n":"30~60分钟","v":"3"},
  193. {"n":"10~30分钟","v":"2"},
  194. {"n":"10分钟以下","v":"1"}]}]
  195. },
  196. detailUrl:'/x/web-interface/view?aid=fyid',//二级详情拼接链接(json格式用)
  197. searchUrl:'/x/web-interface/search/type?search_type=video&keyword=**&page=1',
  198. searchable:2,
  199. quickSearch:0,
  200. headers:{
  201. "User-Agent":"PC_UA",
  202. "Referer": "https://www.bilibili.com",
  203. //"Cookie":"$bili_cookie"
  204. "Cookie":"buvid3=4AE65483-AE8B-4B8A-9E70-2ECB290F8012148796infoc; b_nut=1638236210; CURRENT_FNVAL=4048; buvid4=03F9D01F-919E-5301-CAA4-E0D626C40D0223816-022032520-GlymH7ZVG/nfW6G7DmiQwg%3D%3D; rpdid=|(k|YkRlYRmY0J'uY~|kklRYu; fingerprint=bcec6f62cbb8f0328e2988cab1530e3a; buvid_fp_plain=undefined; PVID=1; buvid_fp=bcec6f62cbb8f0328e2988cab1530e3a; DedeUserID=392430248; DedeUserID__ckMd5=92fb669487f062b2; CURRENT_QUALITY=80; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; _uuid=761043F107-DE87-633C-363F-8819292710410B14945infoc; FEED_LIVE_VERSION=V8; LIVE_BUVID=AUTO3317128964866191; b_lsid=B9102CEAF_191731B0EF5; browser_resolution=2492-1286; SESSDATA=5dc6c209%2C1739765039%2C4c250%2A81CjCO1hbhlsG2OBK1ywlf8ElfP4tSvjudU2VLexbRZSqhP0Pvl1chp2xI3Zo-r2Vlv6wSVm92SnRCMGtWODUxQTJMcVR0ekFqNlpVR1dBazBsMDVMWlRZdVZLd1pnb25sVG9ZbEotUEktVFFJbl8xY25pZ3pSYWFpQ2ozSTR4bkJqQ1BtcEVJQmhBIIEC; bili_jct=de1027728bcc9bcbeec1765bdc1c2b10; sid=h55ubmev; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQ0NzIyNDQsImlhdCI6MTcyNDIxMjk4NCwicGx0IjotMX0.tk7ycdAznYjPId355nkSr2CQrc5YcBS0kAdrMmd01tE; bili_ticket_expires=1724472184"
  205. },
  206. timeout:5000,
  207. limit:8,
  208. play_parse:true,
  209. lazy:"js:let ids=input.split('_');let result={};let iurl='https://api.bilibili.com:443/x/player/playurl?avid='+ids[0]+'&cid='+ids[1]+'&qn=116';let html=request(iurl);let jRoot=JSON.parse(html);let jo=jRoot['data'];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 purl='';if(ja.length>0){if(position===-1){position=0}purl=ja[position]['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'};result['contentType']='video/x-flv';input=result",
  210. double:false,
  211. 推荐:'*',
  212. // 一级:'js:let html=request(input);let msg=JSON.parse(html).message;function title_rep(title){if(/keyword/.test(title)){title=title.replace(\'<em class="keyword">\',"").replace("</em>","").replace("&quot;","\'");log("名称替换👉"+title)};return title}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;vodList.forEach(function(vod){let aid=vod["aid"];let title=vod["title"].trim();title=title_rep(title);title=title_rep(title);title=title_rep(title);title=title_rep(title);let img="https:"+vod["pic"];let remark=vod["duration"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos}',
  213. 一级:'js:let html=request(input);function title_rep(title){if(/keyword/.test(title)){title=title.replace(\'<em class="keyword">\',"").replace("</em>","");log("名称替换👉"+title)};return title}function turnDHM(duration){let min=duration.split(":")[0];let sec=duration.split(":")[1];if(min==0){return sec+"秒"}else if(0<min&&min<60){return min+"分"}else if(60<=min&&min<1440){if(min%60==0){let h=min/60;return h+"小时"}else{let h=min/60;h=(h+"").split(".")[0];let m=min%60;return h+"小时"+m+"分"}}else if(min>=1440){let d=min/60/24;d=(d+"").split(".")[0];let h=min/60%24;h=(h+"").split(".")[0];let m=min%60;let dhm="";if(d>0){dhm=d+"天"}if(h>=1){dhm=dhm+h+"小时"}if(m>0){dhm=dhm+m+"分"}return dhm}return null}let videos=[];let vodList=JSON.parse(html).data.result;vodList.forEach(function(vod){let aid=vod["aid"];let title=vod["title"].trim().replace("&quot;","\'");title=title_rep(title);title=title_rep(title);title=title_rep(title);let img="https:"+vod["pic"];let remark=turnDHM(vod["duration"]);videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos',
  214. 二级:'js:let html=request(input);let jo=JSON.parse(html).data;let aid=jo["aid"];let title=jo["title"].replace(\'<em class="keyword">\',"").replace("</em>","");let pic=jo["pic"];let desc=jo["desc"];let year=jo["pubdate"];let dire=jo["owner"]["name"];let typeName=jo["tname"];let remark=jo["duration"];let vod={vod_id:aid,vod_name:title,vod_pic:pic,type_name:typeName,vod_year:year,vod_area:"bilidanmu",vod_remarks:remark,vod_tags:"mv",vod_director:dire,vod_content:desc};let ja=jo["pages"];let playurls=[];ja.forEach(function(tmpJo){let cid=tmpJo["cid"];let part=tmpJo["part"].replace("#","﹟").replace("$","﹩");playurls.push(part+"$"+aid+"_"+cid)});let playUrl=playurls.join("#");vod["vod_play_from"]="B站";vod["vod_play_url"]=playUrl;VOD=vod;',
  215. 搜索:'*',
  216. 预处理:'if(rule_fetch_params.headers.Cookie.startsWith("http")){rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie);setItem(RULE_CK,cookie)};log(rule_fetch_params.headers.Cookie)',
  217. }