gitcafe.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. var rule = {
  2. title:'小纸条',
  3. host:'https://gitcafe.net',
  4. url:'/fyclass-fypage&vmid=$vmid',
  5. detailUrl:'/pgc/view/web/season?season_id=fyid',
  6. filter_url:'fl={{fl}}',
  7. searchUrl:'/x/web-interface/search/type?keyword=**&page=fypage&search_type=',
  8. searchable:1,
  9. filterable:1,
  10. quickSearch:0,
  11. timeout:5000,
  12. class_name:'华语电视&日韩电视&欧美电视&其他电视&华语电影&日韩电影&欧美电影&其他电影&华语动漫&日韩动漫&欧美动漫&纪录片&综艺片&华语音乐&日韩音乐&欧美音乐&其他音乐',
  13. class_url:'hyds&rhds&omds&qtds&hydy&rhdy&omdy&qtdy&hydm&rhdm&omdm&jlp&zyp&hyyy&rhyy&omyy&qtyy',
  14. play_parse:true,
  15. lazy:`js:
  16. input = panPlay(input,playObj.flag)
  17. `,
  18. limit:5,
  19. 推荐:`js:
  20. let url = "https://gitcafe.net/alipaper/home.json";
  21. let html = request(url);
  22. let jRoot = JSON.parse(html);
  23. var vodList = jRoot.info.new;
  24. let data = jRoot.data;
  25. for (var key in data) {
  26. if (data.hasOwnProperty(key)) {
  27. let obj = data[key];
  28. let name = obj["name"];
  29. if (name.includes("电影") || name.includes("电视") || name.includes("动漫") || name.includes("纪录") || name.includes("综艺") || name.includes("音乐")) {
  30. let catdata = obj["catdata"];
  31. vodList.push(...catdata);
  32. }
  33. }
  34. }
  35. let videos=[];
  36. vodList.forEach(function(vod){
  37. let aid=("https://www.aliyundrive.com/s/"+vod["alikey"]+"").trim();
  38. let title = (vod["title"] || "").trim();
  39. let img="https://www.lgstatic.com/i/image2/M01/15/7E/CgoB5lysLXCADg6ZAABapAHUnQM321.jpg";
  40. let remark=vod["date"];
  41. videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})
  42. })
  43. VODS=videos
  44. `,
  45. 一级:`js:
  46. var gitcafecookie = ""
  47. function get_result(){
  48. let videos=[];
  49. let url="https://gitcafe.net/tool/alipaper/";
  50. let html = request(url, {data:{"action":"viewcat","cat":MY_CATE,"num":MY_PAGE,"token":gitcafecookie}, method:'POST'}, true);
  51. let jRoot = JSON.parse(html);
  52. let vodList=jRoot.data;
  53. vodList.forEach(function(vod){
  54. let aid=("https://www.aliyundrive.com/s/"+vod["alikey"]+"").trim();
  55. let title=vod["title"].trim();
  56. let img="https://www.lgstatic.com/i/image2/M01/15/7E/CgoB5lysLXCADg6ZAABapAHUnQM321.jpg";
  57. let remark=vod["date"];
  58. videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})
  59. })
  60. return videos
  61. }
  62. function getToken(){
  63. let url="https://gitcafe.net/tool/alipaper/";
  64. let html = request(url,{data:{"action":"get_token"},'method':'POST'});
  65. let jo=JSON.parse(html);
  66. gitcafecookie = jo["data"]
  67. }
  68. if (!gitcafecookie.length) {
  69. getToken()
  70. }
  71. VODS=get_result();
  72. `,
  73. 二级:`js:
  74. let id=input;
  75. let title="";
  76. let pic="";
  77. let typeName="";
  78. let dec=id;
  79. let remark="";
  80. let vod={vod_id:id,vod_name:title,vod_pic:pic,type_name:typeName,vod_remarks:remark,vod_content:dec};
  81. initPan();
  82. let panVod = panDetailContent(vod ,[input]);
  83. TABS = panVod.tabs
  84. LISTS = panVod.lists
  85. detailError = panVod.error
  86. vod["vod_play_from"]=panVod.tabs.join("$$$");
  87. for (var i in LISTS) {
  88. if (LISTS.hasOwnProperty(i)) {
  89. // print(i);
  90. try {
  91. LISTS[i] = LISTS[i].map(function (it) {
  92. return it.split('$').slice(0, 2).join('$');
  93. });
  94. } catch (e) {
  95. print('格式化LISTS发生错误:' + e.message);
  96. }
  97. }
  98. }
  99. vod_play_url = LISTS.map(function (it) {
  100. return it.join('#');
  101. }).join("$$$");
  102. vod["vod_play_url"]=vod_play_url;
  103. VOD=vod;
  104. `,
  105. 搜索:`js:
  106. var gitcafecookie = ""
  107. function get_result(){
  108. let videos=[];
  109. let url="https://gitcafe.net/tool/alipaper/";
  110. let html = request(url, {data:{"action":"search","keyword":KEY,"from":"web","token":gitcafecookie}, method:'POST'}, true);
  111. let jRoot = JSON.parse(html);
  112. let vodList=jRoot.data;
  113. vodList.forEach(function(vod){
  114. let aid=("https://www.aliyundrive.com/s/"+vod["alikey"]+"").trim();
  115. let title=vod["title"].trim();
  116. let img="https://www.lgstatic.com/i/image2/M01/15/7E/CgoB5lysLXCADg6ZAABapAHUnQM321.jpg";
  117. let remark=vod["date"];
  118. videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})
  119. })
  120. return videos
  121. }
  122. function getToken(){
  123. let url="https://gitcafe.net/tool/alipaper/";
  124. let html = request(url,{data:{"action":"get_token"},'method':'POST'});
  125. let jo=JSON.parse(html);
  126. gitcafecookie = jo["data"]
  127. }
  128. if (!gitcafecookie.length) {
  129. getToken()
  130. }
  131. VODS=get_result();
  132. `,
  133. }