Skip to content

DataArchitectPro/sharepoint-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sharepoint-dl

License: MIT

English · Русский

Parallel downloader for large HTTPS files from SharePoint / OneDrive-style URLs (including download.aspx?…). Uses several curl requests with Range over HTTP/1.1 and merges chunks in order.

Unlike some multi-connection download managers targeting the same download.aspx endpoint, this tool avoids nghttp2 PROTOCOL_ERROR and bogus small HTML “downloads” when the server mis-handles parallel HTTP/2 streams.

Requirements

  • bash, curl, awk, GNU date (%N)
  • Python 3 + browser-cookie3 only if you use @… browser cookie tokens (a venv is created automatically under $XDG_DATA_HOME/sharepoint-dl/venv, usually ~/.local/share/sharepoint-dl/venv)

Install

git clone https://github.com/DataArchitectPro/sharepoint-dl.git
cd sharepoint-dl
make install PREFIX="$HOME/.local"

Ensure $HOME/.local/bin is on your PATH. Man page:

man -M "$HOME/.local/share/man" sharepoint-dl
# or add to MANPATH

Usage

sharepoint-dl [OPTIONS] <cookies|@token> <URL> <output-file> [chunks]
  • cookies — Netscape cookie file for curl, or a @token (@auto, @firefox, @chrome, …) to read cookies from local browser profiles.
  • URL — full https://… link.
  • output-file — destination path.
  • chunks — optional parallel range count (default 8; overridden by -p).

Options

Option Meaning
-h, --help Full help (Russian text in the script).
--version Print version.
-p, --parts N Number of parallel byte ranges.
--merge-cookies With @… tokens, pass --merge-all to the cookie exporter.
--keep-chunks Keep temporary *.chunks.* directory after success.
--cookie-domain S Host substring for browser cookie export (default sharepoint.com).
-v, --verbose Print each chunk size after download.

Export cookies only (subcommand)

sharepoint-dl browse-cookies --browser firefox sharepoint.com -o ./cookies.txt

Environment

COOKIE_DOMAIN, COOKIE_MERGE_ALL=1, KEEP_CHUNKS=1, VERBOSE=1 mirror the corresponding flags.

Security

Treat Netscape cookie files like passwords. Do not commit them or paste them into chats.

Uninstall

make uninstall PREFIX="$HOME/.local"

Publish to GitHub (first time)

  1. Install GitHub CLI and run gh auth login, or export GITHUB_TOKEN / GH_TOKEN (classic token with repo scope, or fine‑grained equivalent).

  2. From the project directory:

cd /path/to/sharepoint-dl
./tools/publish-github.sh

This creates a public repo sharepoint-dl, sets origin, and pushes main.
Override repo name: REPO_NAME=other-name ./tools/publish-github.sh

Manual equivalent:

gh repo create sharepoint-dl --public --source=. --remote=origin --push

The clone URL above matches the GitHub user detected on this workstation (DataArchitectPro). Forks should change the URL.

License

MIT — see LICENSE.

About

Parallel SharePoint / OneDrive downloader (curl HTTP/1.1 Range)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors