利用Heroku部署Aria2离线下载并上传至OneDrive
无需服务器即可离线下载并自动上传到OneDrive
0x01 首先注册Heroku账号
注册我就不说了 自行注册
0x02 从GitHub部署到Heroku
注册完成后打开https://github.com/moeik/Heroku_aria2
点击Deploy to Heroku,然后会自动跳转到Heroku直接部署
0x03 Rclone挂载OneDrive
下载Rclone:Downoad
解压打开如图:
打开这里的cmd运行:
rclone config
注意:如果运行rclone config
出现报错请将rclone.exe
移动到C:/windows/system32
文件夹下然后打开系统cmd运行命令!
就会看到:
D:\rclone-v1.51.0-windows-amd64>rclone config //配置rclone
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n //新建远程挂载
name> test //名称(自定义)
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Citrix Sharefile
\ "sharefile"
9 / Dropbox
\ "dropbox"
10 / Encrypt/Decrypt a remote
\ "crypt"
11 / FTP Connection
\ "ftp"
12 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
13 / Google Drive
\ "drive"
14 / Google Photos
\ "google photos"
15 / Hubic
\ "hubic"
16 / In memory object storage system.
\ "memory"
17 / JottaCloud
\ "jottacloud"
18 / Koofr
\ "koofr"
19 / Local Disk
\ "local"
20 / Mail.ru Cloud
\ "mailru"
21 / Mega
\ "mega"
22 / Microsoft Azure Blob Storage
\ "azureblob"
23 / Microsoft OneDrive
\ "onedrive"
24 / OpenDrive
\ "opendrive"
25 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
26 / Pcloud
\ "pcloud"
27 / Put.io
\ "putio"
28 / QingCloud Object Storage
\ "qingstor"
29 / SSH/SFTP Connection
\ "sftp"
30 / Sugarsync
\ "sugarsync"
31 / Transparently chunk/split large files
\ "chunker"
32 / Union merges the contents of several remotes
\ "union"
33 / Webdav
\ "webdav"
34 / Yandex Disk
\ "yandex"
35 / http Connection
\ "http"
36 / premiumize.me
\ "premiumizeme"
Storage>23 //选择OneDrive
** See help for onedrive backend at: https://rclone.org/onedrive/ **
Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> //回车
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> //回车
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> //回车
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> //回车
这时候会弹出浏览器让你登录OneDrive
这里登录你要挂载的OneDrive账号
看到这个页面就可以关闭浏览器了,回到cmd
获取成功
Choose a number from below, or type in an existing value
1 / OneDrive Personal or Business
\ "onedrive"
2 / Root Sharepoint site
\ "sharepoint"
3 / Type in driveID
\ "driveid"
4 / Type in SiteID
\ "siteid"
5 / Search a Sharepoint site
\ "search"
Your choice> 1 //选择你的OneDrive版本
Found 1 drives, please select the one you want to use:
0: OneDrive (business) id=xxxxxxxxxxxxxxxxxxxxxxx
Chose drive to use:>0 //这里选择0
Found drive 'root' of type 'business', URL: https://fordes-my.sharepoint.com/personal/cdm_fordes_top/Documents
Is that okay?
y) Yes (default)
n) No
y/n> y //y回车
这时候关闭cmd
Heroku配置填写
打开C:\Users\Administrator\.config\rclone\rclone.conf
路径不一定和我的一样,Administrator
根据你自己的用户名
每一项后面添加\n
,如图:
复制配置,从type = ···
复制到drive_type = ···
粘贴到Heroku里面的RCLONE_CONFIG
最后点击Deploy app创建
转载声明:转载请注明出处:https://aroins.com/67
现在貌似不能嫖heroku了?
大佬能出一个部署在idm上的教程吗
我开了一个新号搞,然后搞好不到5分钟,就没了,号也登不上去了,怎么回事,是被判定滥用了吗?
貌似可以,我轻度使用,到现在是正常的。
世纪互联能搞吗?
大家别弄了,我弄了这个heroku账号直接被封了。。。。
一样
我这一步
Found 1 drives, please select the one you want to use:
0: OneDrive (business) id=xxxxxxxxxxxxxxxxxxxxxxx
没显示出来onedrive,还经常报错503
怎么弄?
heroku会自动休眠 东西还没下完就休眠了 下载的东西下载的记录全没了
用了一个多月,现在进入后出现认证失败的提示
密码输入正确吗,刚试了下,可以正常使用哦
你好~可以世纪互联版Onedrive吗
似乎会出现文件未下载完整就上传到OD的现象(aria2的临时文件.aria2也被上传了)
一直用好像没有出现过这个问题 请检查下载文件是否完整或者链接是否超时呢
我从OD上把疑似未下载完整的视频文件下载下来,发现的确不完整(此时Aria2里还显示正在下载,并且有速度)
看来是玄学问题hhh 抱歉没有解决方法 404 Not Found!
我到got code就不动了,也不知道是什么原因
没有弹出浏览器吗?请把默认浏览器换成Chrome试试
怎么弄谷歌盘,我在选择storage选择了13 googledrive 一路弄,到最后验证完账号就不行了
gdrive可以弄,就是有点麻烦
https://www.jiyiblog.com/archives/031167.html
这个项目不支持GD 如果有需要 去GitHub上面找找?
cmd时候不会跳转到浏览器登陆Onedrive
把默认浏览器换一个试试看
下载的东西会消失咋整
你找直链资源试试
昨天谢谢博主啦。
填写路径需要填写存在的路径,不存在的路径,下载的文件我在onedrive里找不到。
被屏蔽了,部署秒封号啦 (: (
不存在的路径会自动创建呀 博主亲测过