plhys / OneDriveShareLinkPushAria2

Extract the download URL from OneDrive or SharePoint share link and push it to aria2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OneDriveShareLinkPushAria2

Extract the download URL from OneDrive or SharePoint share link and push it to aria2

从OneDrive或SharePoint共享链接提取下载URL并将其推送到aria2,即使在无图形界面的系统中依然可以使用。

Dependent / 依赖

requests==2.25.1

pyppeteer==0.2.5

Usage method / 使用方法

At present, this program supports the following download methods:

  • xxx-my.sharepoint.com Download of share links
    • Downloading multiple files without password for shared links
    • Downloading multiple files with password for shared links
    • Download of files in nested folders
    • Download any file of your choice
  • xxx.sharepoint.com Downloads with share links
  • xxx-my.sharepoint.cn Download of share links (theoretically supported)

目前本程序支持的下载方式:

  • xxx-my.sharepoint.com 下载链接的下载
    • 无下载密码的多文件推送
    • 有下载密码的多文件推送
    • 嵌套文件夹的文件推送
    • 任意选择文件推送
  • xxx.sharepoint.com 下载链接的下载
  • xxx-my.sharepoint.cn 下载链接的下载(理论上支持)

Without password for shared links / 无密码的链接

Take this download link as an example:

https://gitaccuacnz2-my.sharepoint.com/:f:/g/personal/mail_finderacg_com/EheQwACFhe9JuGUn4hlg9esBsKyk5jp9-Iz69kqzLLF5Xw?e=FG7SHh

At this time, you need to use the download code for no password link, that is, main.py. Open this file and you can see that there are some global variables:

If you want to download the second file, you need downloadStart=2 and downloadNum=1

If you want to download the second and third files, you need downloadStart=2, downloadNum=2

After modifying, make sure the target aria2 is on and execute python3 main.py


https://gitaccuacnz2-my.sharepoint.com/:f:/g/personal/mail_finderacg_com/EheQwACFhe9JuGUn4hlg9esBsKyk5jp9-Iz69kqzLLF5Xw?e=FG7SHh 这个下载链接为例

此时需要使用无密码的下载代码,也就是main.py,打开这个文件,可以看到有一些全局变量:

如果想要下载第二个文件,则需要downloadStart=2downloadNum=1

如果想要下载第二、第三个文件,则需要downloadStart=2downloadNum=2

修改好后,确保目标aria2处于开启状态,执行python3 main.py

With password for shared links / 有密码的链接

Take this download link as an example:

https://jia666-my.sharepoint.com/:f:/g/personal/1025_xkx_me/EsqNMFlDoyZKt-RGcsI1F2EB6AiQMBIpQM4Ka247KkyOQw?e=oC1y7r

At this time, you need to use the download code for have password link, that is, havepassword.py. Open this file and you can see that there are some global variables (repeated without further ado):

  • OneDriveSharePwd: Password for the OneDrive link

Usage is similar to the above.


https://jia666-my.sharepoint.com/:f:/g/personal/1025_xkx_me/EsqNMFlDoyZKt-RGcsI1F2EB6AiQMBIpQM4Ka247KkyOQw?e=oC1y7r 这个下载链接为例

此时需要使用有密码的下载代码,也就是havepassword.py,打开这个文件,可以看到有一些全局变量(重复的不再赘述):

  • OneDriveSharePwd: OneDrive链接的密码

使用方法和上面类似。

Note

Before you use it, clone the whole project with git clone https://github.com/gaowanliang/OneDriveShareLinkPushAria2.git to use it. havepassword.py depends on main.py, if you want to use the version that requires a password If you want to use a version that requires a password, you need to pip install pyppeteer

注意

使用前,使用 git clone https://github.com/gaowanliang/OneDriveShareLinkPushAria2.git 将项目整个克隆,才能使用,havepassword.py依赖于main.py,如果要使用需要密码的版本,需要 pip install pyppeteer

About

Extract the download URL from OneDrive or SharePoint share link and push it to aria2

License:Apache License 2.0


Languages

Language:Python 100.0%