Metadata-Version: 2.4
Name: nhentai_tools
Version: 1.1.0
Summary: A python library that allows you to interact with nhentai.net without API key (unofficial).
Author-email: minimalcorruption <74803408+minimalcorruption@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/minimalcorruption/nhentai_tools
Project-URL: Repository, https://github.com/minimalcorruption/nhentai_tools
Project-URL: Bug Tracker, https://github.com/minimalcorruption/nhentai_tools/issues
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: requests>=2.34.2
Requires-Dist: beautifulsoup4>=4.15.0
Provides-Extra: dev
Requires-Dist: twine>=6.2.0; extra == "dev"
Requires-Dist: pytest>=9.1.0; extra == "dev"
Dynamic: license-file

<div align="center">
  <img src="https://raw.githubusercontent.com/minimalcorruption/nhentai_tools/main/repo/ntools_logo.svg" width="200"/>
   <h1>nhentai tools</h1>
  <p>Unofficial Python library for interacting with nhentai.net without API key.</p>

  <!-- Badges -->

[![PyPI version](https://badgen.net/pypi/v/nhentai-tools)](https://pypi.org/project/nhentai-tools/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.md)

</div>

## Installation

```bash
pip install nhentai-tools
```

**nhentai tools requires Python >= 3.9**

## Basic Usage

### Download gallery by ID

```python
from nhentai_tools import download

# Download gallery in gallery folder and embed metadata
download(1337, path="gallery", metadata=True)
# Downloaded files can be found in gallery/
```

### Mass download by tag, character, artist or parody

```python
from nhentai_tools import artist_download, character_download, tag_download, parody_download

# Download all galleries from artist and embed metadata
artist_download("coolsigma", metadata=True)
# Downloaded files can be found in coolsigma/

# Download all galleries with specified character and embed metadata
character_download("JetStream Sam", metadata=True)
# Downloaded files can be found in JetStream-Sam/
```

The library has more mass download functions, please refer to [Downloading](https://github.com/minimalcorruption/nhentai_tools/wiki/Documentation#downloading)

### Working with metadata

```python
from nhentai_tools import extract_metadata, embed_metadata

# Extract metadata, return it as dict and save to "meta" variable
meta = extract_metadata(1337)

# Write metadata in metadata.txt file
embed_metadata(meta, path="metadata")
# File can be found in metadata/metadata.txt
```

## Documentation

Full documentation can be found on [Wiki](https://github.com/minimalcorruption/nhentai_tools/wiki/Documentation)

## Building

```bash
# Required for building
pip install build

git clone https://github.com/minimalcorruption/nhentai_tools
cd nhentai_tools
python -m build

# Installing from local build
pip install .
```

## Important

**_This project is in beta, bugs are expected_<br>**
**_If something goes wrong, please open an issue_**
