“围绕nhentai的RESTful API实现包装类。”

hentai的Python项目详细描述


“不存在争议。”

Python-Hentai-API包装器

这个python包实现了一个围绕nhentai的restfulapi的包装类。 请注意,这不是一个官方API,关于 恩泰.net应重定向到 support@nhentai.com。 进一步注意,本模块的内容通常被视为NSFW。最后, 在这一点上我想说,你在任何情况下都不应该使用 本模块在短时间内发出不合理的请求量。在

安装

从PyPI获取最新的稳定版本:

pip install hentai
<详细信息>Dev Notes for contributor

或者,如果你想 contribution 分叉此存储库并运行

^{pr2}$

确保签出rec-hentai,这样您的工作就可以与下一个 释放候选者。一定要小心,不要使用任何不兼容的功能 使用python 3.7版本。在

文件

你可以找到documentation 联机,或使用wiki了解更多信息 关于这个模块。在

基本用途

Hentai使浏览变得非常容易恩泰.net. 它实现了一个平面 命名空间,便于访问其所有终结点:

fromhentaiimportHentai,Formatdoujin=Hentai(177013)# TrueHentai.exists(doujin.id)# METAMORPHOSISprint(doujin.title(Format.Pretty))# [Tag(id=3981, type='artist', name='shindol', url='/artist/shindol/', count=279)]print(doujin.artist)# ['dark skin', 'group', ... ]print([tag.namefortagindoujin.tag])# 2016-10-18 14:28:49print(doujin.upload_date)# ['https://i.nhentai.net/galleries/987560/1.jpg', ... ]print(doujin.image_urls)# get the sourcedoujin.download(progressbar=True)

除此之外,hentai.Utils还提供了一些其他的助手 方法:

fromhentaiimportUtils,Sort,OptionfrompathlibimportPathprint(Utils.get_random_id())# recommend me something good!print(Utils.get_random_hentai())# advanced search with queriesfordoujininUtils.search_by_query('tag:loli',sort=Sort.PopularWeek):print(doujin.title(Format.Pretty))# store custom meta data as JSON file to diskpopular_loli=Utils.search_by_query('tag:loli',sort=Sort.PopularWeek)custom=[Option.ID,Option.Title,Option.Epos]Utils.export(popular_loli,filename=Path('popular_loli.json'),options=custom)

有关更多信息,请参见https://nhentai.net/info/ 关于搜索查询。在

联系

你可以打dev.hentai-chan@outlook.com联系我 对于不属于问题选项卡的私人问题和询问。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java语义理解递归反向字符串返回语句   java toString()方法打印空值   java大型IN子句   如何使用JavaSpring在JavaScriptjQuery中设置post路径   java ByteArrayOutputStream已上载到服务器   java为什么轮询在SocketIO上获取数据“无法加载请求的项”?   java源代码应该以UTF8格式保存   Java数据库轮询器?   在Java中将double转换为float   java AccessDeniedException:C:\Windows\System32\drivers\etc\hosts