Extract download URLs from OneDrive or SharePoint share links and push them to aria2, even on systems without a GUI (such as Linux).
从OneDrive或SharePoint共享链接提取下载URL并将其推送到aria2,即使在无图形界面的系统中(如Linux)依然可以使用。
requests==2.25.1
pyppeteer==0.2.5
At present, this program supports the following download methods:
Note: aria2 itself does not support HTTP POST download links, while onedrive folder package download is HTTP POST download links, so this program will not support onedrive folder package download
input this command then you can get file list in list.txt
python main.py > list.txt
It maybe output gibberish in powershell, you can input this command before to fix
[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Take this download link as an example:
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:
http://localhost:Port/jsonrpc
if it's nativeFalse
, only the file list is outputIf you want to download the second file, you need downloadNum="2"
If you want to download the second and third file, you need downloadNum="2-3"
If you want to download the second, third, fourth, seventh file, you need downloadNum="2-4,7"
and so on.
After modifying, make sure the target aria2 is on and execute python3 main.py
Take this download link as an example:
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):
Usage is similar to the above.
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
The basic functions of this program have been realized. For a long time, if the software is not unusable, it will not be maintained. If there is a running problem, please bring a download link when raising the issue. The bug type issue that does not provide a download link will not be solved.