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.7.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for NHentai_API-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099e548718b0d744ca6074fa57322cf1db58c1980a8a4edf3d4d4549f995697b |
|
MD5 | 1461232db82fa6bb490b22cfb8933bac |
|
BLAKE2b-256 | 304f9c969d0c7528f8a164e19b01297b4ea76adf792469141e3a0e2937bb2c8a |