嘀哩嘀哩.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Object.assign(muban.mxpro.二级, {
  2. tab_text: 'div--small&&Text',
  3. });
  4. var rule = {
  5. 模板: 'mxpro',
  6. title: '嘀哩嘀哩',
  7. host: 'http://www.dilidili23.com',
  8. url: '/index.php/vod/show/id/fyclass/page/fypage.html',
  9. searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
  10. class_parse: '.navbar-items li:gt(0):lt(8);a&&Text;a&&href;/(\\d+).html',
  11. lazy: $js.toString(() => {
  12. let html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
  13. let url = html.url;
  14. if (html.encrypt == '1') {
  15. url = unescape(url)
  16. } else if (html.encrypt == '2') {
  17. url = unescape(base64Decode(url))
  18. }
  19. if (/\.m3u8/.test(url)) {
  20. let body = request(url);
  21. let lines = body.split('\n');
  22. let m3u8Url = null;
  23. for (let line of lines) {
  24. line = line.trim();
  25. if (line.endsWith('.m3u8')) {
  26. m3u8Url = urljoin(url,line);
  27. console.log(m3u8Url);
  28. break;
  29. }
  30. }
  31. input = {
  32. jx: 0,
  33. url: m3u8Url || url,
  34. parse: 0
  35. };
  36. } else {
  37. input = {
  38. jx: tellIsJx(url),
  39. url: url,
  40. parse: 0
  41. };
  42. }
  43. }),
  44. }