量子资源.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. var rule = {
  2. title: '量子资源',
  3. host: 'https://cj.lzcaiji.com',
  4. homeUrl: '/api.php/provide/vod?ac=detail',
  5. searchUrl: '/api.php/provide/vod?ac=detail&wd=**&pg=fypage',
  6. detailUrl: '/api.php/provide/vod?ac=detail&ids=fyid', //非必填,二级详情拼接链接
  7. searchable: 2,
  8. quickSearch: 0,
  9. filterable: 1,
  10. play_parse: false,
  11. lazy: '',
  12. multi: 1,
  13. timeout: 5000,
  14. limit: 6,
  15. url: '/api.php/provide/vod?ac=detail&t=fyclass&pg=fypage&f=',
  16. class_name: '国产剧&香港剧&韩国剧&动作片&剧情片&喜剧片&爱情片&国产动漫',
  17. class_url: '13&14&15&6&11&7&8&29',
  18. 推荐: 'json:list;vod_name;vod_pic;vod_remarks;vod_id', // double: true, // 推荐内容是否双层定位
  19. // 一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id',
  20. 一级: `js:
  21. function getParam(url,name) {
  22. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  23. var r = url.split('?')[1].match(reg); //获取url中"?"符后的字符串并正则匹配
  24. var context = "";
  25. if (r != null)
  26. context = decodeURIComponent(r[2]);
  27. reg = null;
  28. r = null;
  29. return context == null || context == "" || context == "undefined" ? "" : context;
  30. }
  31. let d = [];
  32. // 忽略分类
  33. let cate_exclude = '34,35,45';
  34. let type_id = getParam(input,'t');
  35. if(!cate_exclude.match(type_id)){
  36. let html = request(input);
  37. let list = JSON.parse(html).list;
  38. list.forEach(function (it){
  39. if(!cate_exclude.match(it.type_id)){
  40. d.push({
  41. title:it.vod_name,
  42. img:it.vod_pic,
  43. desc:it.vod_remarks,
  44. url:it.vod_id
  45. });
  46. }
  47. });
  48. }
  49. setResult(d);
  50. // log(input);
  51. `,
  52. /**
  53. * 资源采集站,二级链接解析
  54. */
  55. // 二级: `json:list;vod_name;vod_pic;vod_remarks;vod_id`,
  56. 二级: `js:
  57. let html = request(input);
  58. let list = JSON.parse(html).list;
  59. if(list.length===1){
  60. VOD = list[0];
  61. VOD.vod_blurb = VOD.vod_blurb.replace(/ /g, '').replace(/<[^>]*>/g, '');
  62. VOD.vod_content = VOD.vod_content.replace(/ /g, '').replace(/<[^>]*>/g, '');
  63. }
  64. `,
  65. /**
  66. * 搜索解析 过滤部分资源
  67. */
  68. // 搜索: 'json:list;vod_name;vod_pic;vod_remarks;vod_id',
  69. 搜索: `js:
  70. let d = [];
  71. // 忽略分类
  72. let cate_exclude = '34,35,45';
  73. let html = request(input);
  74. let list = JSON.parse(html).list;
  75. list.forEach(function (it){
  76. if(!cate_exclude.match(it.type_id)){
  77. d.push({
  78. title:it.vod_name,
  79. img:it.vod_pic,
  80. desc:it.vod_remarks,
  81. url:it.vod_id
  82. });
  83. }
  84. });
  85. setResult(d);
  86. `,
  87. }