Metadata-Version: 2.5
Name: megaloader
Version: 0.3.0
Summary: Python library for extracting downloadable content metadata from file hosting platforms
Author-email: DURAND Malo <malo.durand@epitech.eu>
Maintainer-email: David Duran <dadch1404@gmail.com>
License-Expression: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.14.2
Requires-Dist: lxml>=6.1.3
Requires-Dist: requests>=2.34.2
Provides-Extra: dev
Requires-Dist: mypy>=2.4.0; extra == 'dev'
Requires-Dist: pytest-recording>=0.14.0; extra == 'dev'
Requires-Dist: pytest>=9.1.1; extra == 'dev'
Requires-Dist: requests-mock>=1.12.1; extra == 'dev'
Requires-Dist: syrupy>=6.1.1; extra == 'dev'
Requires-Dist: types-beautifulsoup4>=4.12.0.20250516; extra == 'dev'
Requires-Dist: types-requests>=2.33.0.20261006; extra == 'dev'
Requires-Dist: vcrpy>=8.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# megaloader

[![PyPI version](https://badge.fury.io/py/megaloader.svg)](https://badge.fury.io/py/megaloader)
[![CodeQL](https://github.com/totallynotdavid/megaloader/actions/workflows/codeql.yml/badge.svg)](https://github.com/totallynotdavid/megaloader/actions/workflows/codeql.yml)
[![CI](https://github.com/totallynotdavid/megaloader/actions/workflows/ci.yml/badge.svg)](https://github.com/totallynotdavid/megaloader/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/totallynotdavid/megaloader/graph/badge.svg?token=SBHAGJJB8L)](https://codecov.io/gh/totallynotdavid/megaloader)

A Python library that lists the downloadable files behind an album, gallery, or
file link on a hosting site. It returns each file's direct URL, filename, and
the headers the download needs. Your code does the downloading.

```bash
pip install megaloader
```

It needs Python 3.10 or newer.

```python
import megaloader as mgl

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

`extract()` picks the plugin from the URL's domain and yields `DownloadItem`
objects lazily, so requests happen as you iterate. Failures raise `ValueError`,
`TypeError`, `UnsupportedDomainError`, or `ExtractionError`, which carries a
`category` such as `rate_limit` or `access`.

Plugins cover Bunkr, Cyberdrop, Fapello, GoFile, PixelDrain, Pixiv, Rule34,
Thothub, and Thotslife.

## Learn more

- [Getting started](https://totallynotdavid.github.io/megaloader/getting-started)
- [Library reference](https://totallynotdavid.github.io/megaloader/library)
- [Errors](https://totallynotdavid.github.io/megaloader/errors)
- [Writing plugins](https://totallynotdavid.github.io/megaloader/writing-plugins)
- [Source and contributing](https://github.com/totallynotdavid/megaloader)
