总代码.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. ######share_token1
  2. if(getVar("url").length>1&&getVar("url")!="null"){
  3. if(getVar("url").indexOf("aliyundrive.com/s/")!=-1||getVar("url").indexOf("share_id-")!=-1){
  4. if(getVar("url").indexOf("aliyundrive.com/s/")!=-1){
  5. var share_id=getVar("url").match(/\.com\/s\/([0-9a-zA-Z]+)/)[1];
  6. }else if(getVar("url").indexOf("share_id-")!=-1){
  7. var share_id=getVar("url").split("$$")[0].split("share_id-")[1];
  8. }
  9. if(getVar("pwd")!="null"&&getVar("pwd").length>1){
  10. var pwd=getVar("pwd");
  11. }else{
  12. if(getVar("url").split("$$")[2]){
  13. var pwd=getVar("url").split("$$")[2];
  14. }else{
  15. var pwd="";
  16. }
  17. }
  18. if(getVar("share_token")!="null"){
  19. getVar("share_token");
  20. }else{
  21. JSON.parse(getHttp(JSON.stringify({url:"https://api.aliyundrive.com/v2/share_link/get_share_token",postJson:JSON.stringify({share_pwd:pwd,share_id:share_id})}))).share_token;
  22. }
  23. }else if(getVar("url").indexOf("$$")!=-1){
  24. "";
  25. }else{
  26. alert("ce请输入完整的阿里云盘分享链接,比如https://www.aliyundrive.com/s/wUFXj7116uS");
  27. }
  28. }else{
  29. "";
  30. }
  31. ######目录重组数据root2
  32. if(getVar("url").length>1&&getVar("url")!="null"){
  33. if(getVar("url").indexOf("aliyundrive.com/s/")!=-1){
  34. var xxx_id="share_id-"+getVar("url").match(/\.com\/s\/([0-9a-zA-Z]+)/)[1];
  35. var file_id="root";
  36. }else if(getVar("url").indexOf("$$")!=-1){
  37. var xxx_id=getVar("url").split("$$")[0];
  38. var file_id=getVar("url").split("$$")[1];
  39. }
  40. if(getVar("pwd")!="null"&&getVar("pwd").length>1){
  41. var pwd=getVar("pwd");
  42. }else{
  43. if(getVar("url").split("$$")[2]){
  44. var pwd=getVar("url").split("$$")[2];
  45. }else{
  46. var pwd="";
  47. }
  48. }
  49. }else{
  50. //我的云盘
  51. var cm=android.webkit.CookieManager.getInstance();
  52. var ALICOOKIE=cm.getCookie("www.aliyundrive.com");
  53. if(ALICOOKIE.indexOf("access_token")!=-1&&ALICOOKIE.indexOf("refresh_token")!=-1){
  54. var refresh_token=ALICOOKIE.match(/refresh_token=(.*?)[\s;]/)[1];
  55. var code=getHttp(JSON.stringify({url:"https://auth.aliyundrive.com/v2/account/token",postJson:JSON.stringify({refresh_token:refresh_token,grant_type:"refresh_token"})}));
  56. if(JSON.parse(code).access_token){
  57. var access_token=JSON.parse(code).access_token;
  58. var xxx_id="drive_id-"+ALICOOKIE.match(/drive_id=(.*?)[\s;]/)[1];
  59. var file_id="root";
  60. }else{
  61. alert("登陆已过期,请重新在m浏览器登陆");
  62. }
  63. }else{
  64. alert("请重新登陆阿里云盘网页");
  65. }
  66. }
  67. if(xxx_id.indexOf("share_id")!=-1){
  68. var HEAD=JSON.stringify({"X-Share-Token":getVar("share_token")});
  69. var data=JSON.stringify({share_id:xxx_id.split("-")[1],parent_file_id:file_id,limit: 100,image_thumbnail_process:"image/resize,w_160/format,jpeg",image_url_process:"image/resize,w_1920/format,jpeg",video_thumbnail_process:"video/snapshot,t_1000,f_jpg,ar_auto,w_300",order_by:"name",order_direction:"ASC"});
  70. }else if(xxx_id.indexOf("drive_id")!=-1){
  71. var cm=android.webkit.CookieManager.getInstance();
  72. var ALICOOKIE=cm.getCookie("www.aliyundrive.com");
  73. if(ALICOOKIE.indexOf("access_token")!=-1&&ALICOOKIE.indexOf("refresh_token")!=-1){
  74. var refresh_token=ALICOOKIE.match(/refresh_token=(.*?)[\s;]/)[1];
  75. var code=getHttp(JSON.stringify({url:"https://auth.aliyundrive.com/v2/account/token",postJson:JSON.stringify({refresh_token:refresh_token,grant_type:"refresh_token"})}));
  76. if(JSON.parse(code).access_token){
  77. var access_token=JSON.parse(code).access_token;
  78. }else{
  79. alert("登陆已过期,请重新在m浏览器登陆");
  80. }
  81. }else{
  82. alert("请重新登陆阿里云盘网页");
  83. }
  84. var HEAD=JSON.stringify({"Authorization":access_token});
  85. var data=JSON.stringify({drive_id:xxx_id.split("-")[1],parent_file_id:file_id,limit: 100,image_thumbnail_process:"image/resize,w_160/format,jpeg",image_url_process:"image/resize,w_1920/format,jpeg",video_thumbnail_process:"video/snapshot,t_1000,f_jpg,ar_auto,w_300",order_by:"name",order_direction:"ASC"});
  86. }
  87. var 目录数据=getHttp(JSON.stringify({url:"https://api.aliyundrive.com/adrive/v3/file/list",head:JSON.parse(HEAD),postJson:data}));
  88. var items=JSON.parse(目录数据).items;
  89. if(JSON.parse(目录数据).items){
  90. if(xxx_id.indexOf("share_id")!=-1){
  91. for(var i in items){
  92. if(items[i].category=="video"||items[i].category=="doc"||items[i].category=="image"){
  93. items[i].url="q:"+items[i].category+"?url=share_id-"+items[i].share_id+"$$"+items[i].file_id+"$$"+pwd+"$$"+getVar("url").split("$$")[3];
  94. items[i].文件类型="<font color='red'><b>["+items[i].file_extension+"文件]</b></font>";
  95. }else if(items[i].type=="folder"){
  96. if(file_id=="root"){
  97. FNAME=";";
  98. }else{
  99. FNAME=getVar("url").split("$$")[3];
  100. }
  101. items[i].url="q:root?url=share_id-"+items[i].share_id+"$$"+items[i].file_id+"$$"+pwd+"$$"+FNAME+items[i].name+";";
  102. items[i].文件类型="<font color='red'><b>[文件夹]</b></font>";
  103. }else{
  104. items[i].url="q:video?url=share_id-"+items[i].share_id+"$$"+items[i].file_id+"$$"+pwd;
  105. items[i].文件类型="<font color='red'><b>["+items[i].file_extension+"文件]</b></font>";
  106. }
  107. }
  108. }else if(xxx_id.indexOf("drive_id")!=-1){
  109. for(var i in items){
  110. if(items[i].category=="video"||items[i].category=="doc"||items[i].category=="image"){
  111. items[i].url="q:"+items[i].category+"?url=drive_id-"+items[i].drive_id+"$$"+items[i].file_id+"$$"+getVar("url").split("$$")[2];
  112. items[i].文件类型="<font color='red'><b>["+items[i].file_extension+"文件]</b></font>";
  113. }else if(items[i].type=="folder"){
  114. if(file_id=="root"){
  115. FNAME=";";
  116. }else{
  117. FNAME=getVar("url").split("$$")[2];
  118. }
  119. items[i].url="q:root?url=drive_id-"+items[i].drive_id+"$$"+items[i].file_id+"$$"+FNAME+items[i].name+";";
  120. items[i].文件类型="<font color='red'><b>[文件夹]</b></font>";
  121. }else{
  122. items[i].url="q:video?url=drive_id-"+items[i].drive_id+"$$"+items[i].file_id;
  123. items[i].文件类型="<font color='red'><b>["+items[i].file_extension+"文件]</b></font>";
  124. }
  125. }
  126. }
  127. JSON.stringify(items);
  128. }else if(JSON.parse(目录数据).code=="ShareLinkTokenInvalid"){
  129. alert("来晚了,该分享已失效");
  130. }
  131. ######历史记录3
  132. if(getVar("QJS")&&getVar("QJS")!="null"){
  133. eval(getVar("QJS"));
  134. }else{
  135. eval(e2Rex(getHttp('https://egwang186.coding.net/p/egwang186/d/iptv/git/raw/master/aliyun/QJS.js'),'.dn64()'));
  136. }
  137. var filename='阿里云历史记录.txt';
  138. var 记录=[];
  139. if(getVar("name")!='null'&&getVar("url").indexOf("$$root")==-1){
  140. var title=getVar("name");
  141. var url="q:root?url="+getVar("url");
  142. 记录.push({title:title,url:url});
  143. if(_.read(filename)){
  144. var 新记录=记录.concat(JSON.parse(_.read(filename)).filter(d=>d.url!=记录[0].url));
  145. }else{
  146. var 新记录=记录;
  147. }
  148. _.write(JSON.stringify(新记录),filename);
  149. }
  150. ######读取历史4
  151. if(getVar("QJS")&&getVar("QJS")!="null"){
  152. eval(getVar("QJS"));
  153. }else{
  154. eval(e2Rex(getHttp('https://egwang186.coding.net/p/egwang186/d/iptv/git/raw/master/aliyun/QJS.js'),'.dn64()'));
  155. }
  156. var filename='阿里云历史记录.txt';
  157. _.read(filename);
  158. ######alicookie5
  159. alert("快去首页安装新版吧");
  160. ######过滤非视频6
  161. var 过滤=JSON.parse(getVar("目录重组数据")).filter(item=>item.category=="video"||item.category=="audio");
  162. for(var i in 过滤){
  163. if(过滤[i].download_url){
  164. 过滤[i].url="http://ip111.cn/?wd="+过滤[i].download_url+"###"+过滤[i].drive_id+"###"+过滤[i].file_id;
  165. }else{
  166. 过滤[i].url="http://ip111.cn/?wd="+过滤[i].thumbnail+"$$"+过滤[i].share_id+"$$"+过滤[i].file_id+"$$"+过滤[i].file_extension+"$$"+过滤[i].category+"$$"+getVar("url").split("$$")[2]+"$$"+getVar("url").split("$$")[3]+"$$"+过滤[i].parent_file_id+"$$"+过滤[i].name;
  167. }
  168. }
  169. JSON.stringify(过滤);
  170. ######视频地址7
  171. if(getVar("QJS")&&getVar("QJS")!="null"){
  172. eval(getVar("QJS"));
  173. }else{
  174. eval(e2Rex(getHttp('https://egwang186.coding.net/p/egwang186/d/iptv/git/raw/master/aliyun/QJS.js'),'.dn64()'));
  175. }
  176. if(getVar("url").indexOf("$$")!=-1){
  177. var cm=android.webkit.CookieManager.getInstance();
  178. var ALICOOKIE=cm.getCookie("www.aliyundrive.com");
  179. if(ALICOOKIE&&ALICOOKIE!="null"&&ALICOOKIE.indexOf("access_token")!=-1&&ALICOOKIE.indexOf("refresh_token")!=-1){
  180. //
  181. var pwd=getVar("url").split("?wd=")[1].split("$$")[5];
  182. var share_id=getVar("url").split("?wd=")[1].split("$$")[1];
  183. var refresh_token=ALICOOKIE.match(/refresh_token=(.*?)[\s;]/)[1];
  184. var d = [];
  185. var A=JSON.stringify({url:"https://auth.aliyundrive.com/v2/account/token",postJson:JSON.stringify({refresh_token:refresh_token,grant_type:"refresh_token"})});
  186. var S=JSON.stringify({url:"https://api.aliyundrive.com/v2/share_link/get_share_token",postJson:JSON.stringify({share_pwd:pwd,share_id:share_id})});
  187. var urls = []; //网址列表
  188. urls[0]=A;urls[1]=S;
  189. for (let index = 0; index < urls.length; index++) {
  190. function fn(i) {
  191. return function () {
  192. //这里改成你想要进行的操作
  193. var code = getHttp(urls[i]);
  194. return code //这里改成你自己想要的返回 没有返回删掉这行就行
  195. };
  196. }
  197. d.push(fn(index));
  198. }
  199. var result = []; //result为每个线程运行后返回的结果集
  200. var s = _.submit(d, 2); //n 改为你想开启的线程数
  201. for (let i = 0; i < s.length; i++) {
  202. for (let z of s[i].get()) {
  203. result.push(z);
  204. }
  205. }
  206. //
  207. var Acode=result[0];var Scode=result[1];
  208. var share_token=JSON.parse(Scode).share_token;
  209. if(JSON.parse(Acode).access_token){
  210. var access_token=JSON.parse(Acode).access_token;
  211. }else{
  212. alert("登陆已过期,请重新在m浏览器登陆");
  213. }
  214. }else{
  215. alert("COOKIE被清除了,请重新登陆阿里云盘网页");
  216. }
  217. var file_id=getVar("url").split("?wd=")[1].split("$$")[2];
  218. var 后缀=getVar("url").split("?wd=")[1].split("$$")[3];
  219. var 类型=getVar("url").split("?wd=")[1].split("$$")[4];
  220. var u=getVar("url").split("?wd=")[1].split("$$")[0];
  221. if(类型=="audio"){
  222. var code=getHttp(JSON.stringify({url:"https://api.aliyundrive.com/v2/file/get_share_link_download_url",head:{"Authorization":access_token,"X-Share-Token":share_token},postJson:JSON.stringify({share_id:share_id,get_audio_play_info:true,file_id:file_id})}));
  223. }else{
  224. var code=getHttp(JSON.stringify({url:"https://api.aliyundrive.com/v2/file/get_share_link_download_url",head:{"Authorization":access_token,"X-Share-Token":share_token},postJson:JSON.stringify({share_id:share_id,file_id:file_id,expire_sec:600})}));
  225. }
  226. if(JSON.parse(code).code){
  227. alert("登陆已过期,请重新在m浏览器登陆");
  228. }else{
  229. if(JSON.parse(code).audio_template_list){
  230. var resp=JZ(JSON.stringify({url:JSON.parse(code).audio_template_list[JSON.parse(code).audio_template_list.length-1].url,redirect:false,head:{"Referer":"https://www.aliyundrive.com/"}}));
  231. JSON.stringify({url:resp.head.location,head:{"User-Agent":"Lavf/58.12.100","Connection":"keep-alive","Referer":"https://www.aliyundrive.com/"}});
  232. }else{
  233. //var resp=JZ(JSON.stringify({url:JSON.parse(code).download_url,redirect:false,head:{"Referer":"https://www.aliyundrive.com/"}}));
  234. var file_data={};
  235. var 路径=getVar("url").split("?wd=")[1].split("$$")[6];
  236. var 最后文件夹名=路径.split(";")[路径.split(';').length-2];
  237. file_data.parent_name=路径+最后文件夹名;
  238. file_data.folder_id=getVar("url").split("?wd=")[1].split("$$")[7];
  239. file_data.file_id=file_id;file_data.share_id=share_id;file_data.share_pwd=pwd;file_data.expiration="";
  240. file_data.file_name=getVar("url").split("?wd=")[1].split("$$")[8];
  241. var _d=e2Rex(encodeURI(JSON.stringify(file_data)),".en64()").replace(/\//g,"$");
  242. var 转码1080='http://116.85.31.19:3000/apis/yun-play/'+_d+'/'+access_token+'/'+share_token+'/FHD/index.m3u8';
  243. var 转码720='http://116.85.31.19:3000/apis/yun-play/'+_d+'/'+access_token+'/'+share_token+'/HD/index.m3u8';
  244. JSON.stringify([{name:"原始文件播放",url:JSON.parse(code).download_url,head:{"Referer":"https://www.aliyundrive.com/"}},{name:"转码1080P可投屏",url:转码1080,head:{"Referer":"https://www.aliyundrive.com/"}},{name:"转码720P可投屏",url:转码720,head:{"Referer":"https://www.aliyundrive.com/"}}]);
  245. }
  246. }
  247. }else{
  248. var cm=android.webkit.CookieManager.getInstance();
  249. var ALICOOKIE=cm.getCookie("www.aliyundrive.com");
  250. if(ALICOOKIE.indexOf("access_token")!=-1&&ALICOOKIE.indexOf("refresh_token")!=-1){
  251. var refresh_token=ALICOOKIE.match(/refresh_token=(.*?)[\s;]/)[1];
  252. var code=getHttp(JSON.stringify({url:"https://auth.aliyundrive.com/v2/account/token",postJson:JSON.stringify({refresh_token:refresh_token,grant_type:"refresh_token"})}));
  253. if(JSON.parse(code).access_token){
  254. var access_token=JSON.parse(code).access_token;
  255. }else{
  256. alert("登陆已过期,请重新在m浏览器登陆");
  257. }
  258. }else{
  259. alert("请重新登陆阿里云盘网页");
  260. }
  261. var file_id=getVar("url").split("?wd=")[1].split("###")[2];
  262. var drive_id=getVar("url").split("?wd=")[1].split("###")[1];
  263. var u=getVar("url").split("?wd=")[1].split("###")[0];
  264. var 转码1080='http://116.85.31.19:3000/apis/my-yun-play/'+file_id+'/'+drive_id+'/'+access_token+'/FHD/index.m3u8';
  265. var 转码720='http://116.85.31.19:3000/apis/my-yun-play/'+file_id+'/'+drive_id+'/'+access_token+'/HD/index.m3u8';
  266. JSON.stringify([{name:"原始文件播放",url:u,head:{"Referer":"https://www.aliyundrive.com/"}},{name:"转码1080P可投屏",url:转码1080,head:{"Referer":"https://www.aliyundrive.com/"}},{name:"转码720P可投屏",url:转码720,head:{"Referer":"https://www.aliyundrive.com/"}}]);
  267. }
  268. ######文档预览8
  269. var cm=android.webkit.CookieManager.getInstance();
  270. var ALICOOKIE=cm.getCookie("www.aliyundrive.com");
  271. if(ALICOOKIE.indexOf("access_token")!=-1&&ALICOOKIE.indexOf("refresh_token")!=-1){
  272. var refresh_token=ALICOOKIE.match(/refresh_token=(.*?)[\s;]/)[1];
  273. var Acode=getHttp(JSON.stringify({url:"https://auth.aliyundrive.com/v2/account/token",postJson:JSON.stringify({refresh_token:refresh_token,grant_type:"refresh_token"})}));
  274. if(JSON.parse(Acode).access_token){
  275. var access_token=JSON.parse(Acode).access_token;
  276. }else{
  277. alert("登陆已过期,请重新在m浏览器登陆");
  278. }
  279. }else{
  280. alert("请重新登陆阿里云盘网页");
  281. }
  282. var xxx_id=getVar("url").split("$$")[0];
  283. var file_id=getVar("url").split("$$")[1];
  284. if(xxx_id.indexOf("share_id")!=-1){
  285. var HEAD=JSON.stringify({"Authorization":access_token,"X-Share-Token":getVar("share_token")});
  286. var data=JSON.stringify({share_id:xxx_id.split("-")[1],file_id:file_id});
  287. }else if(xxx_id.indexOf("drive_id")!=-1){
  288. var HEAD=JSON.stringify({"Authorization":access_token});
  289. var data=JSON.stringify({drive_id:xxx_id.split("-")[1],file_id:file_id});
  290. }
  291. var code=getHttp(JSON.stringify({url:"https://api.aliyundrive.com/v2/file/get_office_preview_url",head:JSON.parse(HEAD),postJson:data}));
  292. if(JSON.parse(code).code){
  293. if(JSON.parse(code).code=="NotSupportedFileType"){
  294. alert("此文档格式不支持预览");
  295. }else{
  296. alert("登陆已过期,请重新在m浏览器登陆");
  297. }
  298. }else{
  299. var url=JSON.parse(code).preview_url+"??"+JSON.parse(code).access_token;
  300. var name=getVar("name");
  301. JSON.stringify([{name:name,url:url}]);
  302. }
  303. ######搜索链接9
  304. [
  305. {"title":"阿里盘搜","url":"https://www.alipansou.com/search?k="},
  306. {"title":"奈斯搜索","url":"https://www.niceso.fun/search/?q="},
  307. {"title":"阿里云搜","url":"https://aliyunso.cn/search?page=1&type=&keyword="},
  308. {"title":"UP云搜","url":"https://www.upyunso.com/search.html?page=1&keyword="},
  309. {"title":"云盘资源网","url":"https://www.yunpanziyuan.com/fontsearch.htm?fontname="},
  310. {"title":"云盘资源分享社区","url":"https://alyunpan.com/?q="},
  311. {"title":"阿里小站","url":"https://www.pan666.cn/?q="},
  312. {"title":"霸王龙影库","url":"https://t-rex.tzfile.com/?s="},
  313. {"title":"TG_云盘资源发布","url":"https://tx.me/s/sharealiyun?q="},
  314. {"title":"TG_云盘盘","url":"https://tx.me/s/yunpanpan?q="},
  315. {"title":"TG_云盘影视共享","url":"https://tx.me/s/alypysgx?q="},
  316. {"title":"TG_V云盘","url":"https://tx.me/s/aliyun69?q="},
  317. {"title":"TG_云盘资源共享","url":"https://tx.me/s/aliyunziyuanfenxiang?q="},
  318. {"title":"TG_WAYOU资源","url":"https://tx.me/s/wayouziyuan?q="},
  319. {"title":"TG_影视必应阁","url":"https://tx.me/s/moviebyg?q="},
  320. {"title":"小纸条","url":"https://u.gitcafe.net/?wd="}
  321. ]
  322. ######多链接10
  323. if(getVar("url")!="null"){
  324. if(getVar("url").indexOf("aliyundrive.com/s/")!=-1){
  325. var list=getVar("url").match(/[\s\S]*?https:\/\/www\.aliyundrive\.com\/s\/.*/g);
  326. var items=[];
  327. for(var i in list){
  328. var title=list[i].replace(/\s/g,"").replace(/<.+?>/g,"").split("https://")[0]||"加个标题吧,能从历史记录找到我";
  329. var share_id=list[i].match(/aliyundrive\.com\/s\/([0-9a-zA-Z]+)/)[1];
  330. if(list[i].indexOf("提取码")!=-1){
  331. var pwd=list[i].match(/提取码.*?([0-9a-zA-Z]+)/)[1];
  332. }else if(list[i].indexOf("密码")!=-1){
  333. var pwd=list[i].match(/密码.*?([0-9a-zA-Z]+)/)[1];
  334. }else{
  335. var pwd="";
  336. }
  337. var url="q:root?url=share_id-"+share_id+"$$root$$"+pwd;
  338. items.push({name:title,url:url,detail:url});
  339. }
  340. JSON.stringify(items);
  341. }else{
  342. alert("请输入完整阿里云盘分享链接");
  343. }
  344. }else{
  345. alert("请输入阿里云盘分享链接");
  346. }
  347. ######图片预览11
  348. var cm=android.webkit.CookieManager.getInstance();
  349. var ALICOOKIE=cm.getCookie("www.aliyundrive.com");
  350. if(ALICOOKIE.indexOf("access_token")!=-1&&ALICOOKIE.indexOf("refresh_token")!=-1){
  351. var refresh_token=ALICOOKIE.match(/refresh_token=(.*?)[\s;]/)[1];
  352. var Acode=getHttp(JSON.stringify({url:"https://auth.aliyundrive.com/v2/account/token",postJson:JSON.stringify({refresh_token:refresh_token,grant_type:"refresh_token"})}));
  353. if(JSON.parse(Acode).access_token){
  354. var access_token=JSON.parse(Acode).access_token;
  355. }else{
  356. alert("登陆已过期,请重新在m浏览器登陆");
  357. }
  358. }else{
  359. alert("请重新登陆阿里云盘网页");
  360. }
  361. var xxx_id=getVar("url").split("$$")[0];
  362. var file_id=getVar("url").split("$$")[1];
  363. if(xxx_id.indexOf("share_id")!=-1){
  364. var HEAD=JSON.stringify({"Authorization":access_token,"X-Share-Token":getVar("share_token")});
  365. var data=JSON.stringify({share_id:xxx_id.split("-")[1],file_id:file_id,expire_sec:600});
  366. var code=getHttp(JSON.stringify({url:"https://api.aliyundrive.com/v2/file/get_share_link_download_url",head:JSON.parse(HEAD),postJson:data}));
  367. if(JSON.parse(code).code){
  368. alert(JSON.parse(code).code)
  369. }else{
  370. var resp=JZ(JSON.stringify({url:JSON.parse(code).download_url,redirect:false,head:{"Referer":"https://www.aliyundrive.com/"}}));
  371. var url=resp.head.location+'@{"Referer":"https://www.aliyundrive.com/"}';
  372. JSON.stringify([{url:url}]);
  373. }
  374. }else if(xxx_id.indexOf("drive_id")!=-1){
  375. var 过滤=JSON.parse(getVar("目录重组数据")).filter(item=>item.category=="image");
  376. var items=[];
  377. for(var i in 过滤){
  378. var url=过滤[i].download_url+'@{"Referer":"https://www.aliyundrive.com/"}';
  379. items.push({url:url});
  380. }
  381. JSON.stringify(items);
  382. }
  383. ######QJS12
  384. ZXZhbChmdW5jdGlvbihlLGYsYSxkLGMsZyl7Yz1mdW5jdGlvbihiKXtyZXR1cm4oYjxmPyIiOmMocGFyc2VJbnQoYi9mKSkpKygzNTwoYiU9Zik/U3RyaW5nLmZyb21DaGFyQ29kZShiKzI5KTpiLnRvU3RyaW5nKDM2KSl9O2lmKCEiIi5yZXBsYWNlKC9eLyxTdHJpbmcpKXtmb3IoO2EtLTspZ1tjKGEpXT1kW2FdfHxjKGEpO2Q9W2Z1bmN0aW9uKGIpe3JldHVybiBnW2JdfV07Yz1mdW5jdGlvbigpe3JldHVybiJcXHcrIn07YT0xfWZvcig7YS0tOylkW2FdJiYoZT1lLnJlcGxhY2UobmV3IFJlZ0V4cCgiXFxiIitjKGEpKyJcXGIiLCJnIiksZFthXSkpO3JldHVybiBlfSgiKDUoKXszIDY9e307MyBtPTEuMDszIHE9Ui4xdi4xdy4xeC4xeTszIHI9Ui4xdi4xdy4xeC4xeSgpLmMuMjc7M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