掌心世界.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. var rule = {
  2. title: '掌心世界',
  3. host: 'https://www.zhangxindy.com',
  4. url: '/index.php/vod/show/id/fyclass/page/fypage.html',
  5. searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
  6. searchable: 2,
  7. quickSearch: 0,
  8. filterable: 1,
  9. filter: '',
  10. filter_url: '',
  11. filter_def: {},
  12. headers: {
  13. 'User-Agent': 'MOBILE_UA',
  14. },
  15. timeout: 5000,
  16. class_parse: '.menu&&li;a&&Text;a&&href;/id/(\\d+)',
  17. cate_exclude: '热播榜',
  18. play_parse: true,
  19. lazy: $js.toString(() => {
  20. input = {parse: 1, url: input, js: ''};
  21. }),
  22. double: true,
  23. 推荐: 'ul.shoutu-vodlist;ul&&li;*;*;*;*',
  24. 一级: '.shoutu-vodlist&&li;a:eq(-1)&&Text;img&&data-original;.text&&Text;a&&href',
  25. // 二级访问前: $js.toString(() => {
  26. // log(MY_URL);
  27. // let html = request(MY_URL);
  28. // MY_URL = pd(html, '.playbtn&&a&&href', MY_URL);
  29. // log(MY_URL);
  30. // }),
  31. 二级: {
  32. //title: 'h1&&Text;.hidden-sm&&p&&a&&Text',
  33. title: 'h1&&Text;.shoutu-content&&a&&Text',
  34. img: '.shoutu-content&&img&&data-original',
  35. //desc: ';.hidden-sm&&p&&a:eq(1)&&Text;.hidden-sm&&p&&a:eq(2)&&Text',
  36. desc: '.shoutu-content&&p.data:eq(2)&&Text;.shoutu-content&&a:eq(2)&&Text;.shoutu-content&&a:eq(3)&&Text',
  37. content: '',
  38. //tabs: 'ul.shoutu-playlist.col-flex&&li',
  39. 重定向: $js.toString(() => {
  40. log('执行重定向:' + MY_URL);
  41. // let html = request(MY_URL);
  42. MY_URL = pd(html, '.playbtn&&a&&href', MY_URL);
  43. log('二级重定向到:' + MY_URL);
  44. html = request(MY_URL);
  45. }),
  46. tabs: $js.toString(() => {
  47. log('tabs:MY_URL:' + MY_URL);
  48. TABS = [];
  49. let tabs = pdfa(html, 'ul.shoutu-playlist.col-flex&&li');
  50. log(tabs);
  51. tabs.forEach(it => {
  52. let _tt = pdfh(it, 'body&&Text');
  53. TABS.push(_tt);
  54. });
  55. }),
  56. lists: $js.toString(() => {
  57. LISTS = [];
  58. //log(input);
  59. let lists1 = pdfa(html, '.shoutu-playlist&&li').map(it => {
  60. let _tt = pdfh(it, 'a&&Text');
  61. let _uu = pd(it, 'a&&href', MY_URL);
  62. return _tt + '$' + _uu
  63. });
  64. LISTS.push(lists1);
  65. let _urls = pdfa(html, '.shoutu-playlist:eq(-1)&&li').map(it => {
  66. return pd(it, 'a&&href', MY_URL);
  67. });
  68. _urls = _urls.filter(it => it != MY_URL);
  69. _urls.forEach((_url) => {
  70. let html = request(_url);
  71. let lists1 = pdfa(html, '.shoutu-playlist&&li').map(it => {
  72. let _tt = pdfh(it, 'a&&Text');
  73. let _uu = pd(it, 'a&&href', MY_URL);
  74. return _tt + '$' + _uu
  75. });
  76. LISTS.push(lists1);
  77. });
  78. }),
  79. //lists:'.shoutu-playlist:eq(#id)&&a',
  80. tab_text: 'body&&Text',
  81. list_text: 'body&&Text',
  82. list_url: 'a&&href'
  83. },
  84. 搜索: '*',
  85. }