AlexandreSenpai / Enma

Enma is a Python library designed to fetch and download manga and doujinshi data from many sources including Manganato and NHentai.
MIT License
80 stars 16 forks source link

Add a way to get the latest Doujin, non-async #34

Closed ShiromiTsukasa closed 2 years ago

ShiromiTsukasa commented 2 years ago

I might be stupid, and there's already a way to do that, but I would like to have a way to get the latest doujin (or ID, that's the thing I'm interested in).

AlexandreSenpai commented 2 years ago

Hello @Kuroyuki-Kaze

You can do so using

from NHentai import NHentai

client = NHentai()
first_page = client.get_page(page=1)
latest_doujin = first_page.doujins[0]
latest_doujin_id = latest_doujin.id # 408075

image image

ShiromiTsukasa commented 2 years ago

I see, I see. Whilst I'd love to have that as built-in function, it works for me. Thanks dude!

AlexandreSenpai commented 2 years ago

I could do it. Added this feature to trello.