模板.js 16 KB

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