Skip to content

Miuzarte/GoDown

Repository files navigation

GoDown

Multithread downloader driven by Go

WindowsTerminal_WvJe9OqoNa [commit d24601] 对线程进度条增加了优先级(取块索引), 进度条每次更新不再会将自身置顶, GIF懒得重录了

Features

  • Download in parallel but write sequentially, HDD friendly
  • Auto identify downloads folder (Windows / ~/Downloads on others)
  • Fancy and useless progress bar
  • Output path as a hyperlink

Usage

GoDown [flags] <url> [pattern ...]

Positional arguments:

  • <url> — Download URL. Supports ordinary HTTP(S) URLs and MEGA share links (https://mega.nz/file/... for single files, https://mega.nz/folder/... for shared folders).
  • [pattern ...] — Only used for MEGA folder links. Filters files by name (OR relation). A pattern without * matches as a substring; a pattern with * matches as a regex where * becomes .* (e.g. part*.jpg, 特典). When no pattern is given, all files are downloaded into <DownloadsFolder>/<rootName>/; when patterns are given, matched files are flattened directly into <DownloadsFolder>/.

Flags:

Flag Default Description
-d Download directory (auto-detected on Windows if empty)
-p Proxy address, e.g. http://127.0.0.1:7890
-retry 3 Number of auto retries per thread/block
-t 6 Number of concurrent download threads
-bs 16777216 Block size in bytes (16 MiB by default)
-ll info Log level: trace, debug, info, warn, error, fatal, panic
-pbt true Show total progress bar
-pbs true Show per-thread progress bar

Examples

# Ordinary URL
GoDown "https://example.com/file.zip"

# With proxy and custom output directory
GoDown -d "~/Downloads" -p "http://127.0.0.1:7890" "https://example.com/file.zip"

# MEGA single-file share
GoDown "https://mega.nz/file/0rASQYSR#KD1y_pMnRAJkgp1sPtcno5L548L1WJcfQhN0SCITuI4"

# MEGA folder share (download everything, keep the shared folder name)
GoDown "https://mega.nz/folder/w8I3SCZD#MNMHMyCWjU7-iq7q_IHWPg"

# MEGA folder share, filter by name (substring match, flattened to DownloadsFolder)
GoDown "https://mega.nz/folder/w8I3SCZD#MNMHMyCWjU7-iq7q_IHWPg" "特典"

# MEGA folder share, filter by wildcard pattern
GoDown "https://mega.nz/folder/w8I3SCZD#MNMHMyCWjU7-iq7q_IHWPg" "part*.jpg"

About

Multithread downloader driven by Go

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages