xzys.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. var rule = {
  2. title:'校长影视[云盘]',
  3. host:'https://xzys.fun',
  4. homeUrl: '/',
  5. url: '/fyclass.html?page=fypage',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/search.html?keyword=**',
  10. searchable:2,
  11. quickSearch:0,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Cookie':''
  16. },
  17. timeout:5000,
  18. class_name: '电视剧&电影&动漫&纪录片&综艺',
  19. class_url: 'dsj&dy&dm&jlp&zy',
  20. play_parse:true,
  21. play_json:[{
  22. re:'*',
  23. json:{
  24. parse:0,
  25. jx:0
  26. }
  27. }],
  28. lazy:`js:
  29. input = panPlay(input,playObj.flag)
  30. `,
  31. limit:6,
  32. 推荐:'div.container div.row a:has(>img);img&&alt;img&&src;img&&alt;a&&href',
  33. 一级:'div.container div.row div.list-boxes;img&&alt;img&&src;div.list-actions&&Text;a&&href',
  34. 二级:{
  35. title:"div.container div.row h1&&Text",
  36. img:"div.container div.row img&&src",
  37. desc:'div.container div.row div.article-infobox&&Text', //remark
  38. content:'div.container div.row div#info&&Text',
  39. tabs:`js:
  40. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  41. TABS=[]
  42. let d = pdfa(html, 'div.tc-box a');
  43. let listurl = [];
  44. d.forEach(function(it) {
  45. let burl = pdfh(it, 'a&&href') || '';
  46. if (burl.startsWith("https://www.aliyundrive.com/s/") ||
  47. burl.startsWith("https://www.alipan.com/s/") ||
  48. burl.startsWith("https://pan.quark.cn/s/") ||
  49. burl.startsWith("https://pan.xunlei.com/s/") ||
  50. burl.startsWith("https://pan.baidu.com/s/") ){
  51. listurl.push(burl);
  52. }else if (burl.startsWith("magnet")){
  53. listurl.push(burl);
  54. }else if (burl.startsWith("ed2k")){
  55. listurl.push(burl);
  56. }
  57. });
  58. if (listurl.length){
  59. initPan();
  60. let alistVod = panDetailContent(vod ,listurl);
  61. TABS = alistVod.tabs
  62. LISTS = alistVod.lists
  63. detailError = alistVod.error
  64. }
  65. `,
  66. lists:`js:`,
  67. },
  68. 搜索:`js:
  69. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  70. if (rule_fetch_params.headers.Cookie.startsWith("http")){
  71. rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie);
  72. let cookie = rule_fetch_params.headers.Cookie;
  73. setItem(RULE_CK, cookie);
  74. };
  75. log('xzys seach cookie>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie);
  76. let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
  77. log("xzys search params>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
  78. let search_html = request( HOST + '/search.html?keyword=' + encodeURIComponent(KEY), _fetch_params)
  79. //log("xzys search result>>>>>>>>>>>>>>>" + search_html);
  80. let d=[];
  81. let dlist = pdfa(search_html, 'div.container div.row div.list-boxes');
  82. dlist.forEach(function(it){
  83. let title = pdfh(it, 'h2 a img&&alt');
  84. if (searchObj.quick === true){
  85. if (title.includes(KEY)){
  86. title = KEY;
  87. }
  88. }
  89. let img = pd(it, 'h2 a img&&src', HOST);
  90. let content = pdfh(it, 'p.text_p&&Text');
  91. let desc = pdfh(it, 'div.list-actions&&Text'); //remark
  92. let url = pd(it, 'h2 a&&href', HOST);
  93. d.push({
  94. title:title,
  95. img:img,
  96. content:content,
  97. desc:desc,
  98. url:url
  99. })
  100. });
  101. setResult(d);
  102. `,
  103. }