NHentai Python API made using webscraping.
Project description
NHentai API
A NHentai API made using python webscrapping For update notes follow me on Twitter.
Instalation
pip3 install --upgrade NHentai-API or pip install --upgrade NHentai-API
Library Features
- Home page pagination,
- Doujin information,
- Random doujin,
- Search by id and tag,
- User page
Usage
Home
from nhentai import NHentai
if __name__ == '__main__':
nhentai = NHentai()
random_doujin: dict = nhentai.get_pages(page=1)
expected output:
{
'doujins': [{
'id': str,
'title': str,
'lang': str,
'cover': str,
'data-tags': list[str]
}],
'totalPages': int
}
Random
from nhentai import NHentai
if __name__ == '__main__':
nhentai = NHentai()
random_doujin: dict = nhentai.get_random()
expected output:
{
'id': str,
'title': str,
'secondary_title': str,
'tags': list[str],
'artists': list[str],
'languages': list[str],
'categories': list[str],
'pages': list[str],
'images': list[str]
}
Search
from nhentai import NHentai
if __name__ == '__main__':
nhentai = NHentai()
search_obj: dict = nhentai.search(query='naruto', sort='popular', page=1)
search_obj: dict = nhentai.search(query='30955', sort='popular', page=1)
expected output:
{
'query': str,
'sort': str,
'totalResults': int,
'doujins': [{
'id': str,
'title': str',
'lang': str,
'cover': str,
'data-tags': list[str]
}],
'totalPages': int
}
User page
from nhentai import NHentai
if __name__ == '__main__':
nhentai = NHentai()
user: dict = nhentai.get_user_page(uid='1278294', username='alexandresenpai')
expected output:
{
'uid': str,
'username': str,
'image': str,
'since': str,
'doujins': [{
'id': str,
'cover': str,
'title': str,
'data-tags': list[str]
}]
}
Doujin
from nhentai import NHentai
if __name__ == '__main__':
nhentai = NHentai()
doujin: dict = nhentai._get_doujin(id='287167')
expected output:
{
'id': str,
'title': str,
'secondary_title': str,
'tags': list[str],
'artists': list[str],
'languages': list[str],
'categories': list[str],
'pages': list[str],
'images': list[str]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
NHentai-API-0.0.9.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for NHentai_API-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eb0b93a0c4397e8d8ce9dc61cf7c95c03d8fb16152d22bec08e6a17b9555c28 |
|
MD5 | f5f8fd4d2d2bbb06a6d7afcc2c0f477e |
|
BLAKE2b-256 | 9b345ea32440480fdc2df7be2f78785dccece01587d6525932f259117a104f0c |