jpyy.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. rule = {
  2. headers: {
  3. Referer: 'https://www.cfkj86.com/',
  4. },
  5. host: 'https://www.cfkj86.com',
  6. class_name: '电影&电视剧&综艺&动漫',
  7. class_url: '1&2&3&4',
  8. //homeVod: '.card-box div a;.title&&Text;&&href;img&&src;.bottom div:eq(0)&&Text',
  9. homeVodJS: `
  10. let t = Math.floor(new Date().getTime()).toString();
  11. let url = HOST + '/api/mw-movie/anonymous/home/hotSearch';
  12. let sign = sha1(md5('key=cb808529bae6b6be45ecfab29a4889bc&t=' + t));
  13. let headers = {
  14. 'User-Agent': PC_UA,
  15. Referer: HOST,
  16. Sign: sign,
  17. T: t,
  18. Deviceid: '7462eef7-eeda-4727-8064-543a0a2f1503',
  19. };
  20. request(url, '', headers);|||
  21. let json = [];
  22. if(typeof(html) === 'string') json = JSON.parse(html).data;
  23. else json = html.data;
  24. json.forEach(function(item){
  25. videos.push({
  26. vod_id: item.vodId,
  27. vod_name: item.vodName,
  28. vod_pic: item.vodPic + '?x-image-process=image/resize,w_356,h_498/quality,q_65/format,webp',
  29. vod_remarks: item.vodVersion + ' ' + item.vodRemarks,
  30. vod_year: item.vodYear || item.vodDoubanScore,
  31. });
  32. });
  33. `,
  34. url: '/vod/show/id/fyclass/page/fypage',
  35. //categoryVod: '.movie-ul > div > a;.title&&Text;&&href;img&&src;.bottom div:eq(0)&&Text',
  36. categoryVodJS: `
  37. let $ = load(html);
  38. let data = $('script:contains(videoList)').text().split(',null,')[1].split(']\\\\n')[0].replace(/\\\\/g, '');
  39. let json = JSON.parse(data);
  40. pagecount = json.videoList.data.totalPage;
  41. json.videoList.data.list.forEach(function(item){
  42. videos.push({
  43. vod_id: item.vodId,
  44. vod_name: item.vodName,
  45. vod_pic: item.vodPic + '?x-image-process=image/resize,w_356,h_498/quality,q_65/format,webp',
  46. vod_remarks: item.vodVersion + ' ' + item.vodRemarks,
  47. vod_year: item.vodYear || item.vodDoubanScore,
  48. });
  49. });
  50. `,
  51. detailUrl: '/detail/fyid',
  52. detailVod: {
  53. content: '.wrapper_more_text&&Text',
  54. director: '.director:eq(0) a&&Text',
  55. actor: '.director:eq(1) a&&Text',
  56. playFrom: '.player_name&&Text',
  57. playUrl: "div[type];a;&&Text;&&href"
  58. },// /vod/play/103842/sid/1
  59. lazy:`
  60. let vid = input.split('/')[3];
  61. let sid = input.split('/')[5];
  62. let t = Math.floor(new Date().getTime()).toString();
  63. let url = HOST + '/api/mw-movie/anonymous/v1/video/episode/url?id='+vid+'&nid='+sid;
  64. let signStr = 'id='+vid+'&nid='+sid+'&key=cb808529bae6b6be45ecfab29a4889bc&t=' + t;
  65. let sign = sha1(md5(signStr));
  66. let headers = {
  67. 'User-Agent': PC_UA,
  68. Referer: HOST,
  69. Sign: sign,
  70. T: t,
  71. Deviceid: '7462eef7-eeda-4727-8064-543a0a2f1503',
  72. };
  73. request(url, '', headers);|||
  74. if (typeof(html) === 'Object') playUrl = html.data.playUrl;
  75. else if(typeof(html) === 'string') playUrl = JSON.parse(html).data.playUrl;
  76. `,
  77. searchUrl: '/api/mw-movie/anonymous/video/searchByWord?keyword=**&pageNum=1&pageSize=12',
  78. searchVodJS: `
  79. videos = [];
  80. let t = Math.floor(new Date().getTime()).toString();
  81. let signStr = searchUrl.split('?')[1] + '&key=cb808529bae6b6be45ecfab29a4889bc&t=' + t;
  82. let sign = sha1(md5(signStr));
  83. let headers = {
  84. 'User-Agent': PC_UA,
  85. Referer: HOST,
  86. Sign: sign,
  87. T: t,
  88. Deviceid: '7462eef7-eeda-4727-8064-543a0a2f1503',
  89. };
  90. request(searchUrl, '', headers);|||
  91. let json = [];
  92. if (typeof(html) === 'string') json = JSON.parse(html).data.result.list;
  93. else json = html.data.result.list;
  94. json.forEach(function(item){
  95. videos.push({
  96. vod_id: item.vodId,
  97. vod_name: item.vodName,
  98. vod_pic: item.vodPic + '?x-image-process=image/resize,w_356,h_498/quality,q_65/format,webp',
  99. vod_remarks: item.vodVersion + ' ' + item.vodRemarks,
  100. vod_year: item.vodYear || item.vodDoubanScore,
  101. });
  102. });
  103. `,
  104. }