meow.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. var rule = {
  2. title:'meow.tg[搜]',
  3. host:'https://meow.tg',
  4. homeUrl:'/',
  5. url:'*',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/api/results/query?page=fypage&perPage=20&keyword=**',
  10. searchable:2,
  11. quickSearch:0,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': PC_UA,
  15. 'Accept': '*/*',
  16. 'Referer': 'https://meow.tg/',
  17. },
  18. timeout:5000,
  19. class_name:'',
  20. class_url:'',
  21. play_parse:true,
  22. play_json:[{
  23. re:'*',
  24. json:{
  25. parse:0,
  26. jx:0
  27. }
  28. }],
  29. lazy:'',
  30. limit:6,
  31. 推荐:'',
  32. 一级:'',
  33. 二级:`js:
  34. VOD.vod_play_from = "雲盤";
  35. VOD.vod_remarks = detailUrl;
  36. VOD.vod_actor = "沒有二級,只有一級鏈接直接推送播放";
  37. VOD.vod_content = MY_URL;
  38. VOD.vod_play_url = "雲盤$" + detailUrl;
  39. `,
  40. 搜索:`js:
  41. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  42. let newurl = rule.homeUrl + 'api/results/query?page=' + MY_PAGE+ '&perPage=20&keyword=' + encodeURIComponent(KEY);
  43. let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
  44. log("meow search param>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
  45. let new_html=request(newurl, _fetch_params);
  46. let json=JSON.parse(new_html);
  47. let d=[];
  48. for(const it in json.finalList){
  49. if (json.finalList.hasOwnProperty(it)){
  50. //log("meow search it>>>>>>>>>>>>>>>" + JSON.stringify(json.finalList[it]));
  51. let text = json.finalList[it]["results"]["text"];
  52. let high = json.finalList[it]["results"]["highLight"];
  53. if (/(www.aliyundrive.com|pan.quark.cn|www.alipan.com)/.test(text)){
  54. text = text;
  55. }else if (/(www.aliyundrive.com|pan.quark.cn|www.alipan.com)/.test(high)){
  56. text = high;
  57. }else{
  58. text = "";
  59. }
  60. if (text.length>0){
  61. let title = "";
  62. if (/.*名称(:|:)([^\\n]*)/.test(text)){
  63. title = text.match(/.*名称(:|:)([^\\n]*)/)[2].trim();
  64. }
  65. let content = "";
  66. if (/.*描述(:|:)([^\\n]*)/.test(text)){
  67. content = text.match(/.*描述(:|:)([^\\n]*)/)[2].trim();
  68. }
  69. let desc = json.finalList[it]["source"]["name_zh"];
  70. let img = json.finalList[it]["source"]["avatar"];
  71. let matches = text.match(/(www.aliyundrive.com|pan.quark.cn|www.alipan.com)([\\/0-9a-zA-Z\\+\\-_]*)/);
  72. let burl = "https://" + matches[1] + matches[2];
  73. if (title.includes(KEY)){
  74. log("meow search title,url,img>>>>>>>>>>>>>>>" + title + ",[" + burl + "], " + img);
  75. if (searchObj.quick === true){
  76. title = KEY;
  77. }
  78. d.push({
  79. title:title,
  80. img:img,
  81. content:content,
  82. desc:desc,
  83. url:'push://'+burl
  84. });
  85. }
  86. }
  87. }
  88. }
  89. setResult(d);
  90. `,
  91. }