模板.js 18 KB

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