蛋蛋剧.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // 地址发布页 https://www.dandanju.vip
  2. // 搜索安全验证 > 通过drpy_ocr验证码接口过验证OK
  3. function verifyLogin(url) {
  4. let cnt = 0;
  5. let cookie = '';
  6. let r = Math.random();
  7. let yzm_url = getHome(url) + '/index.php/verify/index.html';
  8. log(`验证码链接:${yzm_url}`);
  9. let submit_url = getHome(url) + '/index.php/ajax/verify_check';
  10. log(`post登录链接:${submit_url}`);
  11. while (cnt < OCR_RETRY) {
  12. try {
  13. let {cookie, html} = reqCookie(yzm_url + '?r=' + r, {toBase64: true});
  14. let code = OcrApi.classification(html);
  15. log(`第${cnt + 1}次验证码识别结果:${code}`);
  16. html = post(submit_url, {
  17. headers: {Cookie: cookie},
  18. body: 'type=show&verify=' + code,
  19. });
  20. html = JSON.parse(html);
  21. if (html.code === 1) {
  22. log(`第${cnt + 1}次验证码提交成功`);
  23. log(cookie);
  24. return cookie // 需要返回cookie
  25. } else if (html.code !== 1 && cnt + 1 >= OCR_RETRY) {
  26. cookie = ''; // 需要清空返回cookie
  27. }
  28. } catch (e) {
  29. log(`第${cnt + 1}次验证码提交失败:${e.message}`);
  30. if (cnt + 1 >= OCR_RETRY) {
  31. cookie = '';
  32. }
  33. }
  34. cnt += 1
  35. }
  36. return cookie
  37. }
  38. globalThis.verifyLogin = verifyLogin;
  39. var rule = {
  40. title:'蛋蛋剧',
  41. // host:'https://www.dandanju.cc',
  42. host:'https://www.dandanju.vip',
  43. hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":PC_UA}});let src=jsp.pdfh(html,"a:eq(0)&&href");print(src);HOST=src',
  44. // url:'/show/fyclass--------fypage---.html',
  45. url:'/show/fyclassfyfilter.html',
  46. filterable:1,//是否启用分类筛选,
  47. filter_url:'-{{fl.area}}-{{fl.by}}-{{fl.class}}-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Zr4252ub+dqcl23mZXNetpmXzXmpn/9nD5i9ph4wWsoGjSU8wBpMDVvdMTRMAQV2Mhi6GTxsGmheqSlzeOcF4IOfkm3UUwAWmnO/UyShCcEQhdEHjAWAfN6RONlGnwZ6XvXMeFvQQPM2duQFve1poHnttswUfK/Et/4JE9Xh4k/VFbAOGmiN1spweQ1na/gGeq00WKktBR2CobtKwVl3x0C+44YqLPo03Cjgj66AnK9t5vv9KuPta1LGKPWL+k4UJJvDPVRUAFozfxgUMWgA8hW3g2P6jqKBj/vV322Gxa1hHm/qALTm7p6o4i0bYJqbtKx5xrcgDfS8iC8hUW8NwlVlwk0GMH31c8OngOq53/f/wm9IAHxz3xGZKt3cQ+C/zploYjcBoDWrOVnBrgDAdWmJwSbVJYRvcQOv9nyPXpY0THNb/lfVvrnT3ij6j6Loi38DX/yg2lAYAAA=',
  49. searchUrl:'/search/**----------fypage---.html',
  50. searchable:2,//是否启用全局搜索,
  51. quickSearch:0,//是否启用快速搜索,
  52. headers:{
  53. 'User-Agent':'MOBILE_UA'
  54. },
  55. timeout:5000,//网站的全局请求超时,默认是3000毫秒
  56. class_parse:'ul.swiper-wrapper&&li;a&&Text;a&&href;.*/(.*?).html',
  57. play_parse:true,
  58. lazy: $js.toString(() => {
  59. let js = 'try{function requestApix(callback){$.post(\"api.php\",{vid:getQueryString(\"vid\")},function(result){callback(result.data.url);},\"json\");}requestApix(function(data){location.href=sign(data);})}catch(e){}location.href=document.querySelector(\"#playleft iframe\").src;';
  60. input = {
  61. parse: 1,
  62. url: input,
  63. click: js,
  64. js: js
  65. };
  66. }),
  67. limit:6,
  68. 推荐:'.tab-content&&li;.lazyload&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
  69. 一级二:'.ewave-vodlist&&li;.lazyload&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
  70. 一级: $js.toString(() => {
  71. let cookie = getItem(RULE_CK, '');
  72. //log('储存的cookie:' + cookie);
  73. let ret = request(MY_URL, {
  74. headers: {
  75. Referer: encodeUrl(MY_URL),
  76. Cookie: cookie,
  77. }
  78. });
  79. if (/系统安全验证/.test(ret)) {
  80. //log(ret);
  81. cookie = verifyLogin(MY_URL);
  82. if (cookie) {
  83. log(`本次成功过验证,cookie:${cookie}`);
  84. setItem(RULE_CK, cookie);
  85. } else {
  86. log(`本次验证失败,cookie:${cookie}`);
  87. }
  88. ret = request(MY_URL, {
  89. headers: {
  90. Referer: encodeUrl(MY_URL),
  91. Cookie: cookie,
  92. }
  93. });
  94. }
  95. //log(ret);
  96. let d = [];
  97. let p = rule.一级二.split(';');
  98. let arr = pdfa(ret, p[0]);//列表
  99. arr.forEach(it => {
  100. d.push({
  101. title: pdfh(it, p[1]),//标题
  102. pic_url: pdfh(it, p[2]),//图片
  103. desc: pdfh(it, p[3]),//描述
  104. url: pdfh(it, p[4]),//链接
  105. });
  106. });
  107. setResult(d);
  108. }),
  109. 二级:{
  110. "title":".picture&&title;.data--span:eq(0)&&Text",
  111. "img":".picture&&img&&data-original",
  112. "desc":".pic-text:eq(0)&&Text;;;.data--span:eq(1)&&Text;.data--span:eq(2)&&Text",
  113. "content":".desc--a&&Text",
  114. "tabs":".nav-tabs&&li",
  115. "lists":".tab-pane:eq(#id)&&li"
  116. },
  117. 搜索: '.ewave-vodlist__media&&li;a&&title;a&&data-original;.hidden-xs--span&&Text;a&&href',
  118. }