Nyahentai Python API made using webscraping.
Project description
Nyahentai API
A Nyahentai API made using python webscrapping For update notes follow me on Twitter.
Instalation
pip install --upgrade Nyahentai-API
# or pip3 install --upgrade Nyahentai-API
Library Features
- Home page pagination,
- Doujin information,
- Random doujin,
- Search by id and tag,
- Character List
Usage
Home
from nyahentai import Nyahentai
if __name__ == '__main__':
nyahentai = Nyahentai()
random_doujin: HomePage = nyahentai.get_pages(page=1)
the expected output is a HomePage instance:
HomePage(
doujins: [
DoujinThumbnail(
id: str,
title: str,
lang: str,
cover: str,
data_tags: List[str])],
total_pages: int)
Random
from nyahentai import Nyahentai
if __name__ == '__main__':
nyahentai = Nyahentai()
random_doujin: Doujin = nyahentai.get_random()
The expected output is a Doujin instance:
Doujin(
id: str
title: str
secondary_title: str
tags: List[str]
artists: List[str]
languages: List[str]
categories: List[str]
characters: List[str]
parodies: List[str]
groups: List[str]
images: List[str]
total_pages: int)
It's good always remember that some doujins doesnt have many properties that are listed above like artists, characters, parodies and more. This is only the default Doujin dataclass template.
Search
from nyahentai import Nyahentai
if __name__ == '__main__':
nyahentai = Nyahentai()
search_obj: SearchPage = nyahentai.search(query='naruto', sort='popular', page=1)
search_obj: SearchPage = nyahentai.search(query='30955', sort='popular', page=1)
expected output:
SearchPage(
query: str,
sort: str,
total_results: int,
doujins: [
DoujinThumbnail(
id: str,
title: str,
lang: str,
cover: str,
data_tags: List[str])],
total_pages: int)
Doujin
from nyahentai import Nyahentai
if __name__ == '__main__':
nyahentai = Nyahentai()
doujin: Doujin = nyahentai._get_doujin(id='287167')
expected output:
Doujin(
id: str
title: str
secondary_title: str
tags: List[str]
artists: List[str]
languages: List[str]
categories: List[str]
characters: List[str]
parodies: List[str]
groups: List[str]
images: List[str]
total_pages: int)
Characters
from nyahentai import Nyahentai
if __name__ == '__main__':
nyahentai = Nyahentai()
doujin: Doujin = nyahentai.get_characters(page=1)
expected output:
CharacterListPage(
page=int,
total_pages=int,
characters=[
CharacterLink(
section: str
title: str
url: str
total_entries: int)])
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
Nyahentai-API-1.0.0.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file Nyahentai-API-1.0.0.tar.gz
.
File metadata
- Download URL: Nyahentai-API-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0658a67e68a3ac682cc7607412e1159208f7012307d12da4f7e5b470564d1735 |
|
MD5 | daf02cc1897e45181e930e73428c331d |
|
BLAKE2b-256 | d0487a13294aba0cc3f88e4abdc240fd0d298bc85ea0e29f3131a4d30861ccf4 |
File details
Details for the file Nyahentai_API-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: Nyahentai_API-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4542725772b1cf1427319c8e2ab1aa5e04477b6383374b2151fa08b7007518d |
|
MD5 | c9f39cba44eb51feb5b10dd7da90028d |
|
BLAKE2b-256 | 546eb25522da3cf722471c25bda59fbc416dedda564b91a09dce9b3fc0e6542c |