yyds.js 6.0 KB

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