ddys.js 2.8 KB

123456789101112131415161718192021222324252627282930
  1. var rule={
  2. title:'ddys',
  3. host:'https://ddys.tv',
  4. // homeUrl:'/',
  5. url:'/fyclass/page/fypage/',
  6. searchUrl:'/?s=**&post_type=post',
  7. searchable:2,//是否启用全局搜索,
  8. quickSearch:0,//是否启用快速搜索,
  9. filterable:0,//是否启用分类筛选,
  10. headers:{//网站的请求头,完整支持所有的,常带ua和cookies
  11. 'User-Agent':'MOBILE_UA',
  12. // "Cookie": "searchneed=ok"
  13. },
  14. // class_name:'电影&剧集&动画',
  15. // class_url:'movie&airing&anime',
  16. class_parse:'#primary-menu li.menu-item;a&&Text;a&&href;\.tv/(.*)',
  17. cate_exclude:'站长|^其他$|关于|^电影$|^剧集$|^类型$',
  18. play_parse:true,
  19. 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}}',
  20. limit:6,
  21. //推荐:'.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
  22. double:true, // 推荐内容是否双层定位
  23. 一级:'.post-box-list&&article;a:eq(-1)&&Text;.post-box-image&&style;a:eq(0)&&Text;a:eq(-1)&&href',
  24. 二级:{"title":".post-title&&Text;.cat-links&&Text","img":".doulist-item&&img&&data-cfsrc","desc":".published&&Text","content":".abstract&&Text","tabs":"js:TABS=['国内','海外(貌似不能播放)']",
  25. 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];',
  26. },
  27. 搜索:'#main&&article;.post-title&&Text;;.published&&Text;a&&href',
  28. 推荐:'*'
  29. }