All Projects → AlexandreSenpai → NHentai-API

AlexandreSenpai / NHentai-API

Licence: MIT License
NHentai API made using python BeautifulSoup webscrapping.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to NHentai-API

rayriffy-h
The missing piece of nhentai
Stars: ✭ 76 (+181.48%)
Mutual labels:  nhentai, hentai, doujinshi, nsfw
OtakuWorld
Anime Watcher, Manga Reader, and Novel Reader as three separate apps, same UI
Stars: ✭ 123 (+355.56%)
Mutual labels:  anime, manga, manga-reader
hentai-downloader
ExHentai exhentai.org, e-hentai.org images gallery download to folder.
Stars: ✭ 37 (+37.04%)
Mutual labels:  manga, hentai, doujinshi
NHentaiAPI
A (full) nHentai API implementation for .NET
Stars: ✭ 24 (-11.11%)
Mutual labels:  nhentai, hentai, nhentai-api
yukino
❄️ [WIP] An extension based Anime & Manga client.
Stars: ✭ 176 (+551.85%)
Mutual labels:  anime, manga, manga-reader
anilabx
AniLabX - android app for watching anime/dramas/cartoons and reading manga/comics/light novels
Stars: ✭ 54 (+100%)
Mutual labels:  anime, manga, manga-reader
anime-dl
ADLCore is an API and app for the download of novels, manga, and anime from a plethora of sites. It works on Windows, Linux, OSX, and Android.
Stars: ✭ 70 (+159.26%)
Mutual labels:  anime, manga, hentai
get-sauce
A command line program to download hentai videos and images from multiple websites
Stars: ✭ 40 (+48.15%)
Mutual labels:  hentai, nsfw
KissNetwork.bundle
Plex Channel to view Anime, Asian Drama, Cartoons, Manga & Comics from KissAnime, KissAsian, KissCartoon, KissManga & ReadComicOnline
Stars: ✭ 95 (+251.85%)
Mutual labels:  anime, manga
desktop
A client for HappyPanda X on the desktop
Stars: ✭ 41 (+51.85%)
Mutual labels:  manga, doujinshi
Kitsu
A kitsu.io api wrapper written in C# .NET Core
Stars: ✭ 15 (-44.44%)
Mutual labels:  anime, manga
Komugari
A simple, multi-functional Discord bot written in Discord.js
Stars: ✭ 39 (+44.44%)
Mutual labels:  anime, nsfw
oTaku
o'taku is an application that allows you to find functional streaming links for your favorite anime. This project aims to simplify the tracking of a particular anime. Indeed, when you search for an anime, you will receive a lot of information about it, but also, a list of streaming links available in several languages.
Stars: ✭ 23 (-14.81%)
Mutual labels:  anime, manga
nani
Crunchyroll without the bloat
Stars: ✭ 63 (+133.33%)
Mutual labels:  anime, manga
Tachidesk-Server
A rewrite of Tachiyomi for the Desktop
Stars: ✭ 1,052 (+3796.3%)
Mutual labels:  manga, manga-reader
anitrend-app
Track all your favorite Anime & Manga with AniTrend as it offers anime or manga lookup, tracking and reference powered by AniList
Stars: ✭ 138 (+411.11%)
Mutual labels:  anime, manga
houdoku
Manga reader and library manager for the desktop
Stars: ✭ 128 (+374.07%)
Mutual labels:  manga, manga-reader
tanuki
🦊 Anime weekly schedule for Kitsu
Stars: ✭ 26 (-3.7%)
Mutual labels:  anime, manga
MangaReaderScraper
Search and download mangas from the command line
Stars: ✭ 23 (-14.81%)
Mutual labels:  manga, manga-reader
AmimeWatch
Telegram bot made in Python 3 using the @pyrogram framework.
Stars: ✭ 19 (-29.63%)
Mutual labels:  anime, manga

CodeFactor PyPI download month codecov Python 3.9+ PyPI license

NHentai API

A NHentai API made using python webscrapping.
For update notes follow me on Twitter or join on NHentai-API discord server

Installation

pip install --upgrade NHentai-API

or

pip3 install --upgrade NHentai-API

Library Features

  • Home page pagination,
  • Doujin information,
  • Random doujin,
  • Search by id and tag,
  • Character List
  • Popular List

Home

from NHentai import NHentai

nhentai = NHentai()
random_doujin: HomePage = nhentai.get_pages(page=1)

The expected output is a HomePage instance:

Page(
    doujins: List[
        DoujinThumbnail(
	        id: str
	        media_id: str
	        title: List[Title]
	        languages: List[Tag]
	        cover: Cover
	        url: str
	        tags: List[Tag]
        )
    ],

    total_pages: int,
    total_results: int,
    per_page: int)

Random

from NHentai import NHentai

nhentai = NHentai()
random_doujin: Doujin = nhentai.get_random()

The expected output is a Doujin instance:

Doujin(
    id: int
    media_id: str
    upload_at: datetime
    url: str
    title: List[Title]
    tags: List[Tag]
    artists: List[Tag]
    languages: List[Tag]
    categories: List[Tag]
    characters: List[Tag]
    parodies: List[Tag]
    groups: List[Tag]
    cover: Cover
    images: List[DoujinPage]
    total_favorites: int = 0
    total_pages: int = 0
)

Note: Not all doujins have certain properties like tags, artists, etc. They could be an empty list or a NoneType value.

Search

from NHentai import NHentai

nhentai = NHentai()
search_obj: SearchPage = nhentai.search(query='naruto', sort=Sort.TODAY, page=1)
search_obj: SearchPage = nhentai.search(query='30955', page=1)

The expected output is a SearchPage instance:

SearchPage(
    query: str
    sort: str
    total_results: int
    total_pages: int
    doujins: List[
        DoujinThumbnail(
	        id: str
	        media_id: str
	        title: List[Title]
	        languages: List[Tag]
	        cover: Cover
	        url: str
	        tags: List[Tag]
        )
    ]
)

Doujin

from NHentai import NHentai

nhentai = NHentai()
doujin: Doujin = nhentai.get_doujin(id='287167')

The expected output is a Doujin instance:

Doujin(
    id: int
    media_id: str
    upload_at: datetime
    url: str
    title: List[Title]
    tags: List[Tag]
    artists: List[Tag]
    languages: List[Tag]
    categories: List[Tag]
    characters: List[Tag]
    parodies: List[Tag]
    groups: List[Tag]
    cover: Cover
    images: List[DoujinPage]
    total_favorites: int = 0
    total_pages: int = 0
)

Characters

from NHentai import NHentai

nhentai = NHentai()
doujin: CharacterListPage = nhentai.get_characters(page=1)

The expected output is a CharacterListPage instance:

CharacterListPage(
    page: int
    total_pages: int
    characters: List[
        CharacterLink(
            section: str
            title: str
            url: str
            total_entries: int
        )
    ]
)

Most Popular

from NHentai import NHentai

nhentai = NHentai()
doujins: PopularPage = nhentai.get_popular_now()

The expected output is a PopularPage instance:

PopularPage(
    total_doujins: int
    doujins: List[
        DoujinThumbnail(
	        id: str
	        media_id: str
	        title: List[Title]
	        languages: List[Tag]
	        cover: Cover
	        url: str
	        tags: List[Tag]
        )
    ],
)

NHentai API Async

This is the first version of the asynchronous nhentai scrapper. The methods work in the very same way as the base nhentai scrapper, but to make it work you'll have to work with asyncio module using an event loop that you can import from it or get from NHentaiAsync class property: event_loop.

Since we're working with async functions, you can only call the NHentaiAsync methods from inside an async funcion or context. If you are already working in an async event loop, such as a python Discord API like discord.py, you can simply await calls that you would otherwise have to call run_until_complete on top of.

Async example 1:

from NHentai import NHentaiAsync

nhentai_async = NHentaiAsync()
event_loop = nhentai_async.event_loop
popular = event_loop.run_until_complete(nhentai_async.get_popular_now())
print(popular)

Async example 2:

from NHentai import NHentaiAsync

nhentai_async = NHentaiAsync()

async def get_popular():
    popular = await nhentai_async.get_popular_now()
    print(popular)

event_loop = nhentai_async.event_loop
event_loop.run_until_complete(get_popular())

Await example:

from NHentai import NHentaiAsync
nhentai_async = NHentaiAsync()

# Run in an async function or you will get an error: `'await' outside async function`.
popular = await nhentai_async.get_popular_now()
print(popular)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].