Skip to content

About

Download from GoFile, Bunkr, PixelDrain, Cyberdrop, and more

Topics

Resources

Contributing

Stars

18 stars

Watchers

1 watching

Forks

Latest commit

 

History

306 Commits

Folders and files

Repository files navigation

Megaloader

CodeQL CI

Megaloader finds the files behind an album, gallery, or file link on a hosting site. It is for shell users and Python programs that need file metadata. The library returns direct URLs, filenames, and required download headers; it does not transfer files. The CLI also downloads them.

Install the CLI:

pip install megaloader-cli

List the files behind a link:

$ megaloader extract https://bunkr.si/a/xYKtNmBx
✓ Using plugin: Bunkr
Extracting metadata... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Found 6 files:

  01. sample-image-06.jpg
  02. sample-image-04.jpg
  03. sample-image-05.jpg
  04. sample-image-03.jpg
  05. sample-image-01.jpg
  06. sample-image-02.jpg

Install the library when your program will handle the transfer:

pip install megaloader
import megaloader as mgl

for item in mgl.extract("https://bunkr.si/a/xYKtNmBx"):
    print(item.filename, item.download_url)

Megaloader supports Python 3.10 and newer.

Features

  • extract() selects a plugin from the URL and yields DownloadItem objects lazily.
  • Each item carries its filename, direct URL, collection name, optional size, and the headers its download needs.
  • megaloader download saves collections into folders, filters by filename, and skips files that already exist.
  • megaloader extract --json emits item metadata for scripts.
  • ExtractionError classifies failures as request, auth, access, network, timeout, protocol, rate_limit, or unknown.
  • Plugins send every request through the fetcher supplied by extract(), so they can be tested with recorded responses.
  • The FastAPI service exposes extraction and downloads over HTTP.

See the manual for supported platforms, library and CLI reference, and plugin authoring.

Contributors can start with .github/CONTRIBUTING.md. The architecture map describes the code boundaries.

License

Apache-2.0. See LICENSE.

About

Download from GoFile, Bunkr, PixelDrain, Cyberdrop, and more

Topics

Resources

Contributing

Stars

18 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages