免登录下载天翼云盘分享文件
-
脚本地址:https://greasyfork.org/zh-CN/scripts/401709 开放式地址:https://github.com/Aruelius/Cloud189_Greasyfork直接安装即可。。
1 .脚本会在没有登录的时候运行,登录了不会执行任何操作
2。
3.当共享的内容问目录文件时,可以直接点击下载按钮下载,不需要点击文件。如果没有油猴插件或者不想安装脚本的(比如我),你也可以这样做。
1.新建一个书签,名字叫做【免登录天翼云盘 】
2.网址就填:javascript:(function(){'use strict'; function sleep(ms){return new Promise(resolve => setTimeout(resolve,ms))}};异步函数main(ms){while(true){if(document。 cookie.indexOf(“ COOKIE_LOGIN_USE”)!=-1){break;}; let title = document.getElementsByClassName(“ title”)[0] .innerText; let saveAs = document.getElementsByClassName(“ btn btn-save-as” )[0] .innerText; if(title!=“属于私密分享,请输入访问码后查看”){console.log(title); if(saveAs ==“转存当前目录”){let cookie_name =“ shareId _“ + _ shareId; let passcode = get_code(cookie_name); get_download_url(passcode); break;}否则if(saveAs ==”转存到云盘“){document.getElementsByClassName(” btn btn-download“)[0] .target =“ _ blank”; document.getElementsByClassName(“ btn btn-download”)[0] .href = downloadUrl; document.getElementsByClassName(“ btn btn-download”)[0] .className =“ btn btn-download download”; break;};};等待sleep(ms);}};函数get_code(cookie_name){let ck = document.cookie.split(';'); for(让i = 0; i <ck.length; i ++){让cookie = ck .trim(); if(cookie.indexOf(cookie_name)== 0){返回cookie.split('=') [1];}}};函数get_download_url(passcode){let urlArray = new Array(); let url =“ https://cloud.189.cn/v2/listShareDir.action?shareId=” + _shareId +“&accessCode = “ + passcode +”&verifyCode =“ + _ verifyCode +”&orderBy = 1&order = ASC&pageNum = 1&pageSize = 60“; fetch(url,{method:” GET“})。then(response => response.json())。then(data = > {for(让我输入data.data){让download_url =“ https:” + data.data .downloadUrl; console.log(download_url); document.getElementsByClassName(“ file-icon”)。 onclick = function(){窗口。open(download_url);}; urlArray = download_url;};返回urlArray;});}; main(1000);})();
[color=rgb(51, 102, 153) !important]复制代码
3.然后每次打开共享链接之后,都点一下这个书签,也可以达到跟安装脚本一样的操作。