meijumip.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. var rule = {
  2. title:'美剧迷[磁]',
  3. //host:'https://www.meijumi.xyz',
  4. //homeUrl:'/',
  5. //url: '/fyclass/page/fypage/?',
  6. host:'http://127.0.0.1:10079',
  7. homeUrl:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.meijumi.net/',
  8. url: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.meijumi.net/fyclass/page/fypage/?',
  9. filter_url:'{{fl.class}}',
  10. filter:{
  11. },
  12. searchUrl: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.meijumi.net/?s=**',
  13. searchable:2,
  14. quickSearch:0,
  15. filterable:0,
  16. headers:{
  17. 'User-Agent': 'PC_UA',
  18. 'Accept': '*/*',
  19. 'Referer': 'https://www.meijumi.net/'
  20. },
  21. timeout:5000,
  22. class_name:'最近更新&美剧&灵异/惊悚&魔幻/科幻&罪案/动作谍战&剧情/历史&喜剧&律政/医务&动漫/动画&纪录片&综艺/真人秀&英剧&韩剧',
  23. class_url:'news&usa&usa/xuanyi&usa/mohuan&usa/zuian&usa/qinggan&usa/xiju&usa/yiwu&usa/katong&usa/jilu&usa/zongyi&en&hanju',
  24. play_parse:true,
  25. play_json:[{
  26. re:'*',
  27. json:{
  28. parse:0,
  29. jx:0
  30. }
  31. }],
  32. lazy:'',
  33. limit:6,
  34. 推荐:'',
  35. 推荐:`js:
  36. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  37. let d = [];
  38. let html = request(input);
  39. let items;
  40. items = pdfa(html, 'main#main div.hd ul li:has(>a>img)');
  41. items.forEach(it => {
  42. d.push({
  43. title: pdfh(it, 'li&&Text'),
  44. desc: '',
  45. pic_url: pd(it, 'img&&src', HOST),
  46. url: pdfh(it, 'a&&href')
  47. });
  48. });
  49. items = pdfa(html, 'main#main div.hd div.huandeng span:has(>a>img)');
  50. if (typeof items !== "undefined") {
  51. items.forEach(it => {
  52. d.push({
  53. title: pdfh(it, 'span&&Text'),
  54. desc: '',
  55. pic_url: pd(it, 'img&&src', HOST),
  56. url: pdfh(it, 'a&&href')
  57. });
  58. });
  59. }
  60. items = pdfa(html, 'main#main div#pingbi_gg div:has(>div>a>img)');
  61. if (typeof items !== "undefined") {
  62. items.forEach(it => {
  63. d.push({
  64. title: pdfh(it, 'a&&title'),
  65. desc: pdfh(it, 'div&&span b&&Text'),
  66. pic_url: pd(it, 'img&&src', HOST),
  67. url: pdfh(it, 'a&&href')
  68. });
  69. });
  70. }
  71. items = pdfa(html, 'main#main div#pingbi_gg div:has(>header>div>a)');
  72. if (typeof items !== "undefined") {
  73. items.forEach(it => {
  74. d.push({
  75. title: pdfh(it, 'header a&&Text'),
  76. desc: pdfh(it, 'header&&div span&&Text'),
  77. pic_url: pd(it, 'figure img&&src', HOST),
  78. url: pdfh(it, 'header a&&href')
  79. });
  80. });
  81. }
  82. setResult(d);
  83. `,
  84. 一级:'',
  85. 一级:`js:
  86. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  87. let d = [];
  88. if (MY_CATE !== "news" ){
  89. let html = request(input);
  90. let list = pdfa(html, 'div#post_list_box article');
  91. list.forEach(it => {
  92. d.push({
  93. title: pdfh(it, 'header a&&Text'),
  94. desc: pdfh(it, 'div.entry-content span:eq(1)&&Text'),
  95. pic_url: pd(it, 'figure img&&src', HOST),
  96. url: pdfh(it, 'header a&&href')
  97. });
  98. })
  99. }else{
  100. input = rule.homeUrl + MY_CATE + '/';
  101. let html = request(input);
  102. let list = pdfa(html, 'article ol&&li');
  103. list.forEach(it => {
  104. d.push({
  105. title: pdfh(it, 'a&&Text'),
  106. desc: pdfh(it, 'li&&span:eq(3)&&Text') + ' / 更新' + pdfh(it, 'li&&span:eq(1)&&Text'),
  107. pic_url: '',
  108. url: pdfh(it, 'a&&href')
  109. });
  110. })
  111. }
  112. setResult(d);
  113. `,
  114. 二级:{
  115. title:"article&&header&&h1&&Text",
  116. img:"article div.single-content img&&src",
  117. desc:"article div.single-content blockquote&&Text",
  118. content:"article div.single-content table&&Text",
  119. tabs:`js:
  120. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  121. TABS=[]
  122. let playGroups = [];
  123. let d = pdfa(html, 'article div.single-content&&p:has(>a)');
  124. d.forEach(function(it) {
  125. let playObj = {"ali":{},"quark":{},"magnet":{}};
  126. let playUrls = pdfa(it, 'a');
  127. let title="";
  128. playUrls.forEach(function(playUrl) {
  129. let purl = pdfh(playUrl, 'a&&href');
  130. if (true || title === ""){
  131. title = pdfh(playUrl, 'a&&Text');
  132. }
  133. if (purl.startsWith("magnet")){
  134. let magfn = title;
  135. try {
  136. magfn = purl.match(/(^|&)dn=([^&]*)(&|$)/)[2];
  137. }catch(e){
  138. magfn = title;
  139. }
  140. let resolution = "unknown";
  141. try {
  142. resolution = magfn.match(/(1080|720|2160|4k|4K)/)[1];
  143. }catch(e){
  144. resolution = "unknown";
  145. }
  146. magfn = resolution + "." + magfn;
  147. log("tabs magnet filename>>>>>>>>>>>" + magfn);
  148. playObj["magnet"][purl]=magfn;
  149. }else if (purl.startsWith("https://www.aliyundrive.com/s/")){
  150. playObj["ali"][purl]=title;
  151. }else if (purl.startsWith("https://pan.quark.cn/s/")){
  152. playObj["quark"][purl]=title;
  153. }
  154. });
  155. playGroups.push(playObj);
  156. });
  157. LISTS.push(playGroups);
  158. let groupIndex = 1;
  159. let haveDelay = false;
  160. playGroups.forEach(function (it) {
  161. let magCount = Object.keys(it["magnet"]).length;
  162. let aliCount = Object.keys(it["ali"]).length;
  163. let quarkCount = Object.keys(it["quark"]).length;
  164. let haveMag = false;
  165. if (magCount==0 && aliCount!==1 && quarkCount!==1 ){
  166. }else{
  167. if (magCount>0){
  168. TABS.push("磁力" + groupIndex);
  169. haveMag = true;
  170. haveDelay = true;
  171. }
  172. if (aliCount === 1){
  173. if (!haveMag && !haveDelay){
  174. haveDelay = true;
  175. TABS.push("選擇右側綫路");
  176. }
  177. TABS.push("阿里雲盤" + groupIndex);
  178. }
  179. if (quarkCount === 1){
  180. if (!haveMag && !haveDelay){
  181. haveDelay = true;
  182. TABS.push("選擇右側綫路");
  183. }
  184. TABS.push("夸克雲盤" + groupIndex);
  185. }
  186. groupIndex = groupIndex + 1;
  187. }
  188. });
  189. log('meijumi TABS >>>>>>>>>>>>>>>>>>' + TABS);
  190. `,
  191. lists:`js:
  192. log(TABS);
  193. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  194. let playGroups = [];
  195. if (false && LISTS.length>0 && typeof LISTS[0] === "object"){
  196. playGroups = LISTS.shift();
  197. }else{
  198. let d = pdfa(html, 'article div.single-content&&p:has(>a)');
  199. d.forEach(function(it) {
  200. let playObj = {"ali":{},"quark":{},"magnet":{}};
  201. let playUrls = pdfa(it, 'a');
  202. let title="";
  203. playUrls.forEach(function(playUrl) {
  204. let purl = pdfh(playUrl, 'a&&href');
  205. if (true || title === ""){
  206. title = pdfh(playUrl, 'a&&Text');
  207. }
  208. if (purl.startsWith("magnet")){
  209. let magfn = title;
  210. try {
  211. magfn = purl.match(/(^|&)dn=([^&]*)(&|$)/)[2];
  212. }catch(e){
  213. magfn = title;
  214. }
  215. let resolution = "unknown";
  216. try {
  217. resolution = magfn.match(/(1080|720|2160|4k|4K)/)[1];
  218. }catch(e){
  219. resolution = "unknown";
  220. }
  221. magfn = resolution + "." + magfn;
  222. log("tabs magnet filename>>>>>>>>>>>" + magfn);
  223. playObj["magnet"][purl]=magfn;
  224. }else if (purl.startsWith("https://www.aliyundrive.com/s/")){
  225. playObj["ali"][purl]=title;
  226. }else if (purl.startsWith("https://pan.quark.cn/s/")){
  227. playObj["quark"][purl]=title;
  228. }
  229. });
  230. playGroups.push(playObj);
  231. });
  232. }
  233. LISTS = [];
  234. let haveDelay = false;
  235. playGroups.forEach(function(it){
  236. let haveMag = false;
  237. if (Object.keys(it["magnet"]).length>0){
  238. haveMag = true;
  239. haveDelay = true;
  240. let d = [];
  241. for(const key in it["magnet"]){
  242. if (it["magnet"].hasOwnProperty(key)){
  243. let title = it["magnet"][key];
  244. let burl = key;
  245. log('meijumi magnet title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  246. log('meijumi magnet burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  247. d.push(title + '$' + burl);
  248. }
  249. }
  250. d.sort();
  251. let newd = [];
  252. d.forEach(it=>{
  253. newd.push(it.substring(it.indexOf(".")+1));
  254. });
  255. LISTS.push(newd);
  256. }
  257. if (Object.keys(it["ali"]).length==1){
  258. if (!haveMag && !haveDelay){
  259. haveDelay = true;
  260. LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]);
  261. }
  262. let d = [];
  263. for(const key in it["ali"]){
  264. if (it["ali"].hasOwnProperty(key)){
  265. let title = it["ali"][key];
  266. //let burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(key);
  267. let burl = "push://" + key;
  268. log('meijumi ali title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  269. log('meijumi ali burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  270. d.push(title + '$' + burl);
  271. }
  272. }
  273. LISTS.push(d);
  274. }
  275. if (Object.keys(it["quark"]).length==1){
  276. if (!haveMag && !haveDelay){
  277. haveDelay = true;
  278. LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]);
  279. }
  280. let d = [];
  281. for(const key in it["quark"]){
  282. if (it["quark"].hasOwnProperty(key)){
  283. let title = it["quark"][key];
  284. //let burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(key);
  285. let burl = "push://" + key;
  286. log('meijumi quark title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  287. log('meijumi quark burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  288. d.push(title + '$' + burl);
  289. }
  290. }
  291. LISTS.push(d);
  292. }
  293. });
  294. `,
  295. },
  296. 搜索:'ul.search-page article;h2&&Text;a img&&src;div.entry-content span:eq(1)&&Text;a&&href;div.entry-content div.archive-content&&Text',
  297. }