模板.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. if (typeof Object.assign != 'function') {
  2. Object.assign = function () {
  3. let target = arguments[0];
  4. for (let i = 1; i < arguments.length; i++) {
  5. let source = arguments[i];
  6. for (let key in source) {
  7. if (Object.prototype.hasOwnProperty.call(source, key)) {
  8. target[key] = source[key];
  9. }
  10. }
  11. }
  12. return target;
  13. };
  14. }
  15. function getMubans() {
  16. var mubanDict = { // 模板字典
  17. mx: {
  18. title: '',
  19. host: '',
  20. url: '/vodshow/fyclass--------fypage---/',
  21. searchUrl: '/vodsearch/**----------fypage---/',
  22. class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
  23. searchable: 2,
  24. quickSearch: 0,
  25. filterable: 0,
  26. headers: {
  27. 'User-Agent': 'MOBILE_UA',
  28. },
  29. play_parse: true,
  30. lazy: '',
  31. limit: 6,
  32. 推荐: '.cbox_list;*;*;*;*;*',
  33. double: true,
  34. 一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
  35. 二级: {
  36. title: 'h2&&Text;.detail_list&&ul:eq(1)&&li&&a:eq(2)&&Text',
  37. img: '.vodlist_thumb&&data-original',
  38. desc: '.content_detail&&li:eq(1)&&Text;.detail_list&&ul:eq(1)&&li&&a&&Text;.detail_list&&ul:eq(1)&&li&&a:eq(1)&&Text;.detail_list&&ul:eq(1)&&li:eq(2)&&Text;.detail_list&&ul:eq(1)&&li:eq(3)&&Text',
  39. content: '.content_desc&&span&&Text',
  40. tabs: '.play_source_tab&&a',
  41. lists: '.content_playlist:eq(#id) li',
  42. },
  43. 搜索: '*',
  44. },
  45. mxpro: {
  46. title: '',
  47. host: '', // homeUrl:'/',
  48. url: '/vodshow/fyclass--------fypage---.html',
  49. searchUrl: '/vodsearch/**----------fypage---.html',
  50. searchable: 2,//是否启用全局搜索,
  51. quickSearch: 0,//是否启用快速搜索,
  52. filterable: 0,//是否启用分类筛选,
  53. headers: {//网站的请求头,完整支持所有的,常带ua和cookies
  54. 'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
  55. },
  56. class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;/(\\d+).html',
  57. play_parse: true,
  58. lazy: '',
  59. limit: 6,
  60. 推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
  61. double: true, // 推荐内容是否双层定位
  62. 一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
  63. 二级: {
  64. "title": "h1&&Text;.module-info-tag&&Text",
  65. "img": ".lazyload&&data-original",
  66. "desc": ".module-info-item:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(3)&&Text",
  67. "content": ".module-info-introduction&&Text",
  68. "tabs": ".module-tab-item",
  69. "lists": ".module-play-list:eq(#id) a"
  70. },
  71. 搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
  72. }, mxone5: {
  73. title: '',
  74. host: '',
  75. url: '/show/fyclass--------fypage---.html',
  76. searchUrl: '/search/**----------fypage---.html',
  77. searchable: 2,//是否启用全局搜索,
  78. quickSearch: 0,//是否启用快速搜索,
  79. filterable: 0,//是否启用分类筛选,
  80. class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html',
  81. play_parse: true,
  82. lazy: '',
  83. limit: 6,
  84. 推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
  85. double: true, // 推荐内容是否双层定位
  86. 一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
  87. 二级: {
  88. "title": "h1&&Text;.tag-link&&Text",
  89. "img": ".module-item-pic&&img&&data-src",
  90. "desc": ".video-info-items:eq(0)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text",
  91. "content": ".vod_content&&Text",
  92. "tabs": ".module-tab-item",
  93. "lists": ".module-player-list:eq(#id)&&.scroll-content&&a"
  94. },
  95. 搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
  96. }, 首图: {
  97. title: '',
  98. host: '',
  99. url: '/vodshow/fyclass--------fypage---/',
  100. searchUrl: '/vodsearch/**----------fypage---.html',
  101. searchable: 2,//是否启用全局搜索,
  102. quickSearch: 0,//是否启用快速搜索,
  103. filterable: 0,//是否启用分类筛选,
  104. headers: {//网站的请求头,完整支持所有的,常带ua和cookies
  105. 'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
  106. },
  107. class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
  108. play_parse: true,
  109. lazy: '',
  110. limit: 6,
  111. 推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
  112. double: true, // 推荐内容是否双层定位
  113. 一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
  114. 二级: {
  115. "title": ".myui-content__detail .title&&Text;.myui-content__detail p:eq(-2)&&Text",
  116. "img": ".myui-content__thumb .lazyload&&data-original",
  117. "desc": ".myui-content__detail p:eq(0)&&Text;.myui-content__detail p:eq(1)&&Text;.myui-content__detail p:eq(2)&&Text",
  118. "content": ".content&&Text",
  119. "tabs": ".nav-tabs:eq(0) li",
  120. "lists": ".myui-content__list:eq(#id) li"
  121. },
  122. 搜索: '#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
  123. }, 首图2: {
  124. title: '',
  125. host: '',
  126. url: '/list/fyclass-fypage.html',
  127. searchUrl: '/vodsearch/**----------fypage---.html',
  128. searchable: 2,//是否启用全局搜索,
  129. quickSearch: 0,//是否启用快速搜索,
  130. filterable: 0,//是否启用分类筛选,
  131. headers: {
  132. 'User-Agent': 'UC_UA', // "Cookie": ""
  133. }, // class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
  134. class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
  135. play_parse: true,
  136. lazy: '',
  137. limit: 6,
  138. 推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
  139. double: true, // 推荐内容是否双层定位
  140. 一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
  141. 二级: {
  142. "title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text",
  143. "img": ".stui-content__thumb .lazyload&&data-original",
  144. "desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text",
  145. "content": ".detail&&Text",
  146. "tabs": ".stui-vodlist__head h3",
  147. "lists": ".stui-content__playlist:eq(#id) li"
  148. },
  149. 搜索: 'ul.stui-vodlist__media:eq(0),ul.stui-vodlist:eq(0),#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
  150. 搜索1: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
  151. 搜索2: 'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
  152. }, 默认: {
  153. title: '',
  154. host: '',
  155. url: '',
  156. searchUrl: '',
  157. searchable: 2,
  158. quickSearch: 0,
  159. filterable: 1,
  160. filter: '',
  161. filter_url: '',
  162. filter_def: {},
  163. headers: {
  164. 'User-Agent': 'MOBILE_UA',
  165. },
  166. timeout: 5000,
  167. class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
  168. cate_exclude: '',
  169. play_parse: true,
  170. lazy: `js:input = {parse: 1, url: input, js: ''}`,
  171. double: true,
  172. 推荐: '列表1;列表2;标题;图片;描述;链接;详情',
  173. 一级: '列表;标题;图片;描述;链接;详情',
  174. 二级: {
  175. title: 'vod_name;vod_type',
  176. img: '图片链接',
  177. desc: '主要信息;年代;地区;演员;导演',
  178. content: '简介',
  179. tabs: '',
  180. lists: 'xx:eq(#id)&&a',
  181. tab_text: 'body&&Text',
  182. list_text: 'body&&Text',
  183. list_url: 'a&&href'
  184. },
  185. 搜索: '列表;标题;图片;描述;链接;详情',
  186. }, vfed: {
  187. title: '',
  188. host: '',
  189. url: '/index.php/vod/show/id/fyclass/page/fypage.html',
  190. searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
  191. searchable: 2,//是否启用全局搜索,
  192. quickSearch: 0,//是否启用快速搜索,
  193. filterable: 0,//是否启用分类筛选,
  194. headers: {
  195. 'User-Agent': 'UC_UA',
  196. }, // class_parse:'.fed-pops-navbar&&ul.fed-part-rows&&a.fed-part-eone:gt(0):lt(5);a&&Text;a&&href;.*/(.*?).html',
  197. class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
  198. play_parse: true,
  199. lazy: '',
  200. limit: 6,
  201. 推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
  202. double: true, // 推荐内容是否双层定位
  203. 一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
  204. 二级: {
  205. "title": "h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text",
  206. "img": ".fed-list-info&&a&&data-original",
  207. "desc": ".fed-deta-content&&.fed-part-rows&&li:eq(1)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(2)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(3)&&Text",
  208. "content": ".fed-part-esan&&Text",
  209. "tabs": ".fed-drop-boxs&&.fed-part-rows&&li",
  210. "lists": ".fed-play-item:eq(#id)&&ul:eq(1)&&li"
  211. },
  212. 搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
  213. }, 海螺3: {
  214. title: '',
  215. host: '',
  216. searchUrl: '/v_search/**----------fypage---.html',
  217. url: '/vod_____show/fyclass--------fypage---.html',
  218. headers: {
  219. 'User-Agent': 'MOBILE_UA'
  220. },
  221. timeout: 5000,
  222. class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
  223. cate_exclude: '明星|专题|最新|排行',
  224. limit: 40,
  225. play_parse: true,
  226. lazy: '',
  227. 推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
  228. double: true,
  229. 一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
  230. 二级: {
  231. "title": ".hl-infos-title&&Text;.hl-text-conch&&Text",
  232. "img": ".hl-lazy&&data-original",
  233. "desc": ".hl-infos-content&&.hl-text-conch&&Text",
  234. "content": ".hl-content-text&&Text",
  235. "tabs": ".hl-tabs&&a",
  236. "lists": ".hl-plays-list:eq(#id)&&li"
  237. },
  238. 搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
  239. searchable: 2,//是否启用全局搜索,
  240. quickSearch: 0,//是否启用快速搜索,
  241. filterable: 0,//是否启用分类筛选,
  242. }, 海螺2: {
  243. title: '',
  244. host: '',
  245. searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
  246. url: '/index.php/vod/show/id/fyclass/page/fypage/',
  247. headers: {
  248. 'User-Agent': 'MOBILE_UA'
  249. },
  250. timeout: 5000,
  251. class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
  252. limit: 40,
  253. play_parse: true,
  254. lazy: '',
  255. 推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
  256. double: true,
  257. 一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
  258. 二级: {
  259. "title": "h2&&Text;.deployment&&Text",
  260. "img": ".lazy&&data-original",
  261. "desc": ".deployment&&Text",
  262. "content": ".ec-show&&Text",
  263. "tabs": "#tag&&a",
  264. "lists": ".play_list_box:eq(#id)&&li"
  265. },
  266. 搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
  267. searchable: 2,//是否启用全局搜索,
  268. quickSearch: 0,//是否启用快速搜索,
  269. filterable: 0,//是否启用分类筛选,
  270. }, 短视: {
  271. title: '',
  272. host: '', // homeUrl:'/',
  273. url: '/channel/fyclass-fypage.html',
  274. searchUrl: '/search.html?wd=**',
  275. searchable: 2,//是否启用全局搜索,
  276. quickSearch: 0,//是否启用快速搜索,
  277. filterable: 0,//是否启用分类筛选,
  278. headers: {//网站的请求头,完整支持所有的,常带ua和cookies
  279. 'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
  280. },
  281. class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
  282. cate_exclude: '解析|动态',
  283. play_parse: true,
  284. lazy: '',
  285. limit: 6,
  286. 推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
  287. double: true, // 推荐内容是否双层定位
  288. 一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
  289. 二级: {
  290. "title": "h1&&Text;.content-rt&&p:eq(0)&&Text",
  291. "img": ".img&&img&&data-src",
  292. "desc": ".content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text",
  293. "content": ".zkjj_a&&Text",
  294. "tabs": ".py-tabs&&option",
  295. "lists": ".player:eq(#id) li"
  296. },
  297. 搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
  298. }, 短视2: {
  299. title: '',
  300. host: '',
  301. class_name: '电影&电视剧&综艺&动漫',
  302. class_url: '1&2&3&4',
  303. searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
  304. searchable: 2,
  305. quickSearch: 0,
  306. headers: {'User-Agent': 'MOBILE_UA'},
  307. url: '/index.php/api/vod#type=fyclass&page=fypage',
  308. filterable: 0,//是否启用分类筛选,
  309. filter_url: '',
  310. filter: {},
  311. filter_def: {},
  312. detailUrl: '/index.php/vod/detail/id/fyid.html',
  313. play_parse: true,
  314. lazy: '',
  315. limit: 6,
  316. 推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
  317. 一级: 'js:let body=input.split("#")[1];let t=Math.round(new Date/1e3).toString();let key=md5("DS"+t+"DCC147D11943AF75");let url=input.split("#")[0];body=body+"&time="+t+"&key="+key;print(body);fetch_params.body=body;let html=post(url,fetch_params);let data=JSON.parse(html);VODS=data.list.map(function(it){it.vod_pic=urljoin2(input.split("/i")[0],it.vod_pic);return it});',
  318. 二级: {
  319. "title": ".slide-info-title&&Text;.slide-info:eq(3)--strong&&Text",
  320. "img": ".detail-pic&&data-original",
  321. "desc": ".fraction&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(2)--strong&&Text;.slide-info:eq(1)--strong&&Text",
  322. "content": "#height_limit&&Text",
  323. "tabs": ".anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a",
  324. "tab_text": ".swiper-slide&&Text",
  325. "lists": ".anthology-list-box:eq(#id) li"
  326. },
  327. 搜索: 'json:list;name;pic;;id',
  328. }, 采集1: {
  329. title: '',
  330. host: '',
  331. homeTid: '13',
  332. homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
  333. detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
  334. searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
  335. url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
  336. headers: {'User-Agent': 'MOBILE_UA'},
  337. timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
  338. // class_url: '1&2&3&4',
  339. // class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
  340. class_parse: 'json:class;',
  341. limit: 20,
  342. multi: 1,
  343. searchable: 2,//是否启用全局搜索,
  344. quickSearch: 1,//是否启用快速搜索,
  345. filterable: 0,//是否启用分类筛选,
  346. play_parse: true,
  347. parse_url: '',
  348. lazy: `js:
  349. if(/\\.(m3u8|mp4)/.test(input)){
  350. input = {parse:0,url:input}
  351. }else{
  352. if(rule.parse_url.startsWith('json:')){
  353. let purl = rule.parse_url.replace('json:','')+input;
  354. let html = request(purl);
  355. input = {parse:0,url:JSON.parse(html).url}
  356. }else{
  357. input= rule.parse_url+input;
  358. }
  359. }
  360. `,
  361. 推荐: '*',
  362. 一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
  363. 二级: `js:
  364. let html=request(input);
  365. html=JSON.parse(html);
  366. let data=html.list;
  367. VOD=data[0];`,
  368. 搜索: '*',
  369. }
  370. };
  371. return JSON.parse(JSON.stringify(mubanDict));
  372. }
  373. var mubanDict = getMubans();
  374. var muban = getMubans();
  375. export default {muban, getMubans};