an nhentai api wrapper.
Project description
nhentai.py
API
nhentai.get_doujin(id:int)
Get a doujin by its /g/id.
nhentai.get_homepage(page:int)
Get the list of the most recently uploaded doujins on the homepage.
nhentai.search(query:str, page:int, sort_by:str)
Returns a list of doujins related to a given keyword.
nhentai.search_tagged(tag_id:int, page:int, sort_by:str)
Returns a list of doujins that have the given tag id.
Examples
Getting doujin using a /g/id
>>> d = nhentai.get_doujin(123)
>>>
>>> # URL to first page's image.
>>> d[0].url
'https://i.nhentai.net/galleries/635/1.jpg'
>>>
>>> d.__dict__
{'id': 123,
'media_id': '635',
'thumbnail': 'https://t.nhentai.net/galleries/635/thumb.jpg',
'cover': 'https://t.nhentai.net/galleries/635/cover.jpg'}
'titles': {'english': '(C69) [Nakayohi Mogudan (Mogudan)] Omakehon 2005 (Neon Genesis Evangelion)', 'japanese': '(C69) [なかよひモグダン (モグダン)] おまけ本 2005 (新世紀エヴァンゲリオン)', 'pretty': 'Omakehon 2005'},
'tags': [Tag(id=17202, type='artist', name='mogudan', url='/artist/mogudan/', count=213)
...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
nhentai.py-2-py3-none-any.whl
(3.2 kB
view hashes)