耐看点播.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. //过验证失败
  2. function verifyLogin(url) {
  3. let cnt = 0;
  4. let cookie = '';
  5. let r = Math.random();
  6. let yzm_url = getHome(url) + '/index.php/verify/index.html';
  7. log(`验证码链接:${yzm_url}`);
  8. let submit_url = getHome(url) + '/index.php/ajax/verify_check';
  9. log(`post登录链接:${submit_url}`);
  10. while (cnt < OCR_RETRY) {
  11. try {
  12. let {cookie, html} = reqCookie(yzm_url + '?r=' + r, {toBase64: true});
  13. let code = OcrApi.classification(html);
  14. log(`第${cnt + 1}次验证码识别结果:${code}`);
  15. html = post(submit_url, {
  16. headers: {Cookie: cookie},
  17. body: 'type=show&verify=' + code,
  18. });
  19. html = JSON.parse(html);
  20. if (html.code === 1) {
  21. log(`第${cnt + 1}次验证码提交成功`);
  22. log(cookie);
  23. return cookie // 需要返回cookie
  24. } else if (html.code !== 1 && cnt + 1 >= OCR_RETRY) {
  25. cookie = ''; // 需要清空返回cookie
  26. }
  27. } catch (e) {
  28. log(`第${cnt + 1}次验证码提交失败:${e.message}`);
  29. if (cnt + 1 >= OCR_RETRY) {
  30. cookie = '';
  31. }
  32. }
  33. cnt += 1
  34. }
  35. return cookie
  36. }
  37. globalThis.verifyLogin = verifyLogin;
  38. Object.assign(muban.mxpro.二级,{
  39. tabs: '.tab-item',
  40. });
  41. var rule = {
  42. 模板:'mxpro',
  43. title: '耐看点播',
  44. host: 'https://www.nkdvd.com',
  45. //url: '/vodshow/fyfilter.html',
  46. url: '/vodshow/id/fyclass/page/fypage.html',
  47. //https://www.nkdvd.com/vodshow/area/美国/by/hits/class/剧情/id/31/page/2/year/2023.html
  48. searchUrl: '/vodsearch/**----------fypage---.html',
  49. cate_exclude:'今日更新|发布页|热榜||热搜榜|深夜福利|美女成人直播',
  50. filter:'H4sIAAAAAAAAA+1a3U4bRxh9ldVeczHrxfa4D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pVxx6xalXHHrFqVccesWpVxx6xalXHHrF2Rdu5WBtQ3hleCvrSvJWDravBtufgSJRRN8gnhc0N4kaFdH30uWcWFogalSUq7eeTdjRxXyfXSq2Lfpi7XkN2C25eMeiFBKlCyTAGx4ln2E8ggJ8XoKzxjBhQQE+bjIZIQF/7BYyvUHsH09DhYIoWhV9cT2rQ5WE4zUR6e1ferOb3u6M0NzNXImiPqoKjtcypbduIzTM6U1mavuX3jCnN2Yj/DyQ2tqnN90jt1MzncE73RQoOMqPFQ/XZKnO5LAx2Fmg7YosmpbMtGS4Yloy05KZlsy0ZKpgWjLTktlPsiXL2Lgl+5/fb6UGx3t5N5XeWKSGcVFZExcftELC8RqtEd741Dz0XknCMduoUWPEIwXk9HB7HxH6IePvvcRQEzJNyDQh04RMEzJNyPzWQ6ZrP2bIDGt70WOEjWmdKOIKDhWfejcVECpu4XhBsj/XEuUDOJeuoIBQXRSr4FdXCUkIGhzswRA0hF//P5M8ZDAzvyCacCcLJtyZcGfCnSqYcGfC3cOFu0nbhLunH+6e4ktsEwVNFDRR0ERBEwVNFDRR8BuIglkbR8Gv8TGsN/8Bquf/w1A7AAA=',
  51. //filter_url:'{{fl.地区}}-{{fl.排序}}-{{fl.剧情}}-{{fl.语言}}-{{fl.字母}}---fypage---{{fl.年份}}',
  52. filter_url:'area/{{fl.地区}}/by/{{fl.排序}}/class/{{fl.剧情}}/id/{{fl.类型}}/page/fypage/year/{{fl.年份}}',
  53. filter_def:{
  54. 20: {cateId: '20'},
  55. 21: {cateId: '21'},
  56. 22: {cateId: '22'},
  57. 23: {cateId: '23'},
  58. 24: {cateId: '24'},
  59. 25: {cateId: '25'}
  60. },
  61. filterable:1,
  62. 一级:'.module-items&&a;.module-poster-item-title&&Text;.lazy&&data-original;.module-item-note&&Text;a&&href',
  63. /*一级: $js.toString(() => {
  64. let cookie = getItem(RULE_CK, '');
  65. //log('储存的cookie:' + cookie);
  66. let ret = request(MY_URL, {
  67. headers: {
  68. Referer: encodeUrl(MY_URL),
  69. Cookie: cookie,
  70. }
  71. });
  72. if (/系统安全验证/.test(ret)) {
  73. //log(ret);
  74. cookie = verifyLogin(MY_URL);
  75. if (cookie) {
  76. log(`本次成功过验证,cookie:${cookie}`);
  77. setItem(RULE_CK, cookie);
  78. } else {
  79. log(`本次验证失败,cookie:${cookie}`);
  80. }
  81. ret = request(MY_URL, {
  82. headers: {
  83. Referer: encodeUrl(MY_URL),
  84. Cookie: cookie,
  85. }
  86. });
  87. }
  88. //log(ret);
  89. let d = [];
  90. let p = rule.一级二.split(';');
  91. let arr = pdfa(ret, p[0]);//列表
  92. arr.forEach(it => {
  93. d.push({
  94. title: pdfh(it, p[1]),//标题
  95. pic_url: pdfh(it, p[2]),//图片
  96. desc: pdfh(it, p[3]),//描述
  97. url: pdfh(it, p[4]),//链接
  98. });
  99. });
  100. setResult(d);
  101. }),*/
  102. 搜索验证标识:'系统安全验证',
  103. }