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.8.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for NHentai_API-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b45f49422fdc82293743742aca885e3641aacc7417ff9bad2506047fe66af8a2 |
|
MD5 | aa8d90f502a0f236af9ef3d8fd9caf42 |
|
BLAKE2b-256 | 7718ff27d874225ccb108f730c3470178612735563df0d9e0f008e57eafd20c4 |