ddys.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. var lists = `js:
  2. log(TABS);
  3. let d = [];
  4. pdfh = jsp.pdfh;
  5. pdfa = jsp.pdfa;
  6. if (typeof play_url === "undefined") {
  7. var play_url = ""
  8. }
  9. function getLists(html) {
  10. let src = pdfh(html, ".wp-playlist-script&&Html");
  11. src = JSON.parse(src).tracks;
  12. let list1 = [];
  13. let list2 = [];
  14. let url1 = "";
  15. let url2 = "";
  16. src.forEach(function(it) {
  17. let src0 = it.src0;
  18. let src1 = it.src1;
  19. let title = it.caption;
  20. url1 = "https://v.ddys.pro" + src0;
  21. url2 = "https://ddys.pro/getvddr2/video?id=" + src1 + "&type=mix";
  22. let zm = "https://ddys.pro/subddr/" + it.subsrc;
  23. list1.push({
  24. title: title,
  25. url: url1,
  26. desc: zm
  27. });
  28. list2.push({
  29. title: title,
  30. url: url2,
  31. desc: zm
  32. })
  33. });
  34. return {
  35. list1: list1,
  36. list2: list2
  37. }
  38. }
  39. var data = getLists(html);
  40. var list1 = data.list1;
  41. var list2 = data.list2;
  42. let nums = pdfa(html, "body&&.post-page-numbers");
  43. nums.forEach(function(it) {
  44. let num = pdfh(it, "body&&Text");
  45. log(num);
  46. let nurl = input + num + "/";
  47. if (num == 1) {
  48. return
  49. }
  50. log(nurl);
  51. let html = request(nurl);
  52. let data = getLists(html);
  53. list1 = list1.concat(data.list1);
  54. list2 = list2.concat(data.list2)
  55. });
  56. list1 = list1.map(function(item) {
  57. return item.title + "$" + play_url + urlencode(item.url + "|" + input + "|" + item.desc)
  58. });
  59. list2 = list2.map(function(item) {
  60. return item.title + "$" + play_url + urlencode(item.url + "|" + input + "|" + item.desc)
  61. });
  62. LISTS = [list1, list2];
  63. `;
  64. var lazy = `js:
  65. let purl = input.split("|")[0];
  66. let referer = input.split("|")[1];
  67. let zm = input.split("|")[2];
  68. print("purl:" + purl);
  69. print("referer:" + referer);
  70. print("zm:" + zm);
  71. if (/getvddr/.test(purl)) {
  72. let html = request(purl, {
  73. headers: {
  74. Referer: HOST,
  75. "User-Agent": MOBILE_UA
  76. }
  77. });
  78. print(html);
  79. try {
  80. input = {jx:0,url:JSON.parse(html).url,parse:0} || {}
  81. } catch (e) {
  82. input = purl
  83. }
  84. } else {
  85. input = {
  86. jx: 0,
  87. url: purl,
  88. parse: 0,
  89. header: JSON.stringify({
  90. 'user-agent': MOBILE_UA,
  91. 'referer': HOST
  92. })
  93. }
  94. }
  95. `;
  96. // 网址发布页 https://ddys.site
  97. // 网址发布页 https://ddys.wiki
  98. var rule={
  99. title:'ddys',
  100. // host:'https://ddys.wiki',
  101. // hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":MOBILE_UA}});HOST = jsp.pdfh(html,"a:eq(1)&&href")',
  102. host:'https://ddys.pro',
  103. // host:'https://ddys.mov',
  104. url:'/fyclass/page/fypage/',
  105. searchUrl:'/?s=**&post_type=post',
  106. searchable:2,
  107. quickSearch:0,
  108. filterable:0,
  109. headers:{
  110. 'User-Agent':'MOBILE_UA',
  111. },
  112. class_parse:'#primary-menu li.menu-item;a&&Text;a&&href;\.pro/(.*)',
  113. cate_exclude:'站长|^其他$|关于|^电影$|^剧集$|^类型$',
  114. play_parse:true,
  115. // lazy:'js:let purl=input.split("|")[0];let referer=input.split("|")[1];let zm=input.split("|")[2];print("purl:"+purl);print("referer:"+referer);print("zm:"+zm);let myua="okhttp/3.15";if(/ddrkey/.test(purl)){let ret=request(purl,{Referer:referer,withHeaders:true,"User-Agent":myua});log(ret);input=purl}else{let html=request(purl,{headers:{Referer:referer,"User-Agent":myua}});print(html);try{input=JSON.parse(html).url||{}}catch(e){input=purl}}',
  116. lazy:lazy,
  117. limit:6,
  118. 推荐:'*',
  119. double:true, // 推荐内容是否双层定位
  120. 一级:'.post-box-list&&article;a:eq(-1)&&Text;.post-box-image&&style;a:eq(0)&&Text;a:eq(-1)&&href',
  121. 二级:{
  122. "title":".post-title&&Text;.cat-links&&Text",
  123. "img":".doulist-item&&img&&data-cfsrc",
  124. "desc":".published&&Text",
  125. "content":".abstract&&Text",
  126. // "tabs":"js:TABS=['国内','海外(貌似不能播放)']",
  127. "tabs":"js:TABS=['国内(改Exo播放器)','国内2']",
  128. // "lists":"js:log(TABS);let d=[];pdfh=jsp.pdfh;pdfa=jsp.pdfa;if(typeof play_url===\"undefined\"){var play_url=\"\"}function getLists(html){let src=pdfh(html,\".wp-playlist-script&&Html\");src=JSON.parse(src).tracks;let list1=[];let list2=[];src.forEach(function(it){let src0=it.src0;let src1=it.src1;let src2=it.src2;let title=it.caption;let url1=\"https://ddys.tv/getvddr/video?id=\"+src1+\"&dim=1080P+&type=mix\";let url2=\"https://w.ddys.tv\"+src0+\"?ddrkey=\"+src2;let zm=\"https://ddys.tv/subddr/\"+it.subsrc;list1.push({title:title,url:url1,desc:zm});list2.push({title:title,url:url2,desc:zm})});return{list1:list1,list2:list2}}var data=getLists(html);var list1=data.list1;var list2=data.list2;let nums=pdfa(html,\"body&&.post-page-numbers\");nums.forEach(function(it){let num=pdfh(it,\"body&&Text\");log(num);let nurl=input+num+\"/\";if(num==1){return}log(nurl);let html=request(nurl);let data=getLists(html);list1=list1.concat(data.list1);list2=list2.concat(data.list2)});list1=list1.map(function(item){return item.title+\"$\"+play_url+urlencode(item.url+\"|\"+input+\"|\"+item.desc)});list2=list2.map(function(item){return item.title+\"$\"+play_url+urlencode(item.url+\"|\"+input+\"|\"+item.desc)});LISTS=[list1,list2];",
  129. // lists:'js:log(TABS);let d=[];pdfh=jsp.pdfh;pdfa=jsp.pdfa;if(typeof play_url==="undefined"){var play_url=""}function getLists(html){let src=pdfh(html,".wp-playlist-script&&Html");src=JSON.parse(src).tracks;let list1=[];let list2=[];src.forEach(function(it){let src0=it.src0;let src1=it.src1;let src2=it.src2;let title=it.caption;let url1="https://ddys.pro/getvddr/video?id="+src1+"&dim=1080P+&type=mix";let url2="https://w.ddys.pro"+src0+"?ddrkey="+src2;let zm="https://ddys.pro/subddr/"+it.subsrc;list1.push({title:title,url:url1,desc:zm});list2.push({title:title,url:url2,desc:zm})});return{list1:list1,list2:list2}}var data=getLists(html);var list1=data.list1;var list2=data.list2;let nums=pdfa(html,"body&&.post-page-numbers");nums.forEach(function(it){let num=pdfh(it,"body&&Text");log(num);let nurl=input+num+"/";if(num==1){return}log(nurl);let html=request(nurl);let data=getLists(html);list1=list1.concat(data.list1);list2=list2.concat(data.list2)});list1=list1.map(function(item){return item.title+"$"+play_url+urlencode(item.url+"|"+input+"|"+item.desc)});list2=list2.map(function(item){return item.title+"$"+play_url+urlencode(item.url+"|"+input+"|"+item.desc)});LISTS=[list1,list2];',
  130. "lists":lists
  131. },
  132. 搜索:'#main&&article;.post-title&&Text;;.published&&Text;a&&href'
  133. }