H-Viewer e绅士新规则
采用之前大佬在github上分享的规则,我修复了tga标签和预览图的bug,目前使用海阔以,特此分享!
规则:
{"categories":[
{
"cid":1,
"title":"首页",
"url":"https://exhentai.org/?page\u003d{page:0}"
},{
"cid":2,
"title":"同人志",
"url":"https://exhentai.org/doujinshi/{page:0}"
},{
"cid":3,
"title":"漫画",
"url":"https://exhentai.org/manga/{page:0}"
},{
"cid":4,
"title":"同人CG",
"url":"https://exhentai.org/artistcg/{page:0}"
},{
"cid":5,
"title":"游戏CG",
"url":"https://exhentai.org/gamecg/{page:0}"
},{
"cid":6,
"title":"欧美",
"url":"https://exhentai.org/western/{page:0}"
},{
"cid":7,
"title":"Non-H",
"url":"https://exhentai.org/non-h/{page:0}"
},{
"cid":8,
"title":"图集",
"url":"https://exhentai.org/imageset/{page:0}"
},{
"cid":9,
"title":"Cosplay",
"url":"https://exhentai.org/cosplay/{page:0}"
},{
"cid":10,
"title":"亚洲AV",
"url":"https://exhentai.org/asianporn/{page:0}"
},{
"cid":11,
"title":"MISC",
"url":"https://exhentai.org/misc/{page:0}"
}],"disableHProxy":false,"extraRule":{
"pictureRule":{
"url":{
"fun":"attr",
"param":"src",
"selector":"div.sni a img[style]"
}
}
},"flag":"singlePageBigPicture|repeatedThumbnail|preloadGallery|loginRequired","galleryRule":{
"commentRule":{
"author":{
"fun":"html",
"selector":"div.c3 \u003e a:first-child"
},"content":{
"fun":"html",
"selector":"div.c6"
},"datetime":{
"fun":"html",
"regex":"Posted on (.*?) UTC by","selector":"div.c3"
},"item":{
"selector":"div#cdiv \u003e div.c1"
}
},"pictureRule":{
"item":{
"selector":"div.gdtm"
},"thumbnail":{
"fun":"attr",
"param":"style",
"regex":".*(https?://.*.jpg).*",
"selector":"div"
},"url":{
"fun":"attr",
"param":"href",
"selector":"div a"
}
},"tags":{
"fun":"attr",
"param":"id",
"regex":".*\:(.*)",
"selector":"div#taglist table tbody tr td:eq(1) div"
},"title":{
"fun":"html",
"selector":"h1#gj"
}
},"galleryUrl":"https://exhentai.org/g/{idCode:}/?p\u003d{page:0}\u0026hc\u003d1","gid":1,"index":0,"indexRule":{
"category":{
"fun":"html",
"selector":"td.gl1c div"
},"cover":{
"fun":"src",
"regex":"(//|inits?~)(.*?org)[~/]([^~]*\\.jpg)[~\"]",
"replacement":"http://$2/$3",
"selector":"td.gl2c div.glthumb div img"
},"datetime":{
"fun":"html",
"selector":"td.gl2c div[onclick]"
},"idCode":{
"fun":"attr",
"param":"href",
"regex":"/g/(.*)",
"selector":"td.gl3c a"
},"item":{
"selector":"table.itg tbody tr"
},"rating":{
"fun":"attr",
"param":"style",
"regex":"background-position:-?(\\d+)px -?(\\d+)px",
"replacement":"5-$1/16-($2-1)/40",
"selector":"td.gl2c div.ir"
},"title":{
"fun":"html",
"selector":"td.gl3c a div"
},"uploader":{
"fun":"html",
"selector":"td.gl4c div a"
}
},"indexUrl":"https://exhentai.org/?page\u003d{page:0}","isGrid":false,"loginUrl":"https://forums.e-hentai.org/index.php?act\u003dLogin","searchUrl":"https://exhentai.org/?f_search\u003d{keyword:}\u0026f_sh\u003don\u0026page\u003d{page:0}","sid":12,"title":"Ex-hentai","versionCode":7
}
版权申明
本文系作者 @木灵鱼儿 原创发布在木灵鱼儿站点。未经许可,禁止转载。
全部评论 9
aslen168
Google Chrome Android能帮忙谢谢这个网址的规则吗?
https://m.svipmh.com/
网站限制只有移动端才能访问,PC端打开就一片空白。
木灵鱼儿
FireFox Windows 10虾米皮
Google Chrome Android木灵鱼儿
Google Chrome Android PieKawaki
Google Chrome Windows 7木灵鱼儿你好,最近看到了您“H-Viewer e绅士新规则”这篇文章,想关于H-viewer请教您。
我想自建一个新网站(https://pururin.io/)的站点规则添加到H-viewer中去。已经查看了puredark作者在github上的关于自建的说明,但是没有能够全看懂。目前只学习过C和C++语言。现在尝试将已经编写好的两个站点:177漫画和绅士的站点规则仔细阅读,但只能看懂大概框架。
不是很清楚如果要完全看懂需要学习什么语言:xiaoku:,所以只是尝试用类比的方法进行改写,主要是针对indexurl和galleryurl两小条。通过对比177漫画和新网站的网址尝试写了一下,但遇到了问题。具体来说,对于下面这个网址https://pururin.io/gallery/39291/milk-mamire-ch-5 ,把galleryurl写为https://puruin.io/gallery/{idCode:}/{page:01}/ , 然而后面的milk-mamire-ch-5这部分是标题,就不知道如何编写。站点规则中的其他部分更是不知道如何修改。
所以,想请教您,
1. 上面那个例子中要编写galleryurl,应该如何编写呢。
2. 得到网站的源代码,要编写站点规则,应该是什么样的步骤呢。(类比的方法很蠢,正常是怎么通过网站源代码或者网址知道诸如https://exhentai.org/?page\u003d{page:0},这样的代码的呢,特别是下面这个
https://e-hentai.org/g/{idCode:}/?p={page:0}&hc=1 例子的 p= 和 &hc=1是什么意思 )。
3. 如果编写这些对于只学习过C和C++的人来说不能直接理解,应当学习什么以后才可以自己看懂并开始编写站点规则呢。
不论是什么内容,都非常期待您在百忙之余的回复。
ps:本想发送邮件但是好像发不出去:xiaoku:
木灵鱼儿
FireFox Android PieKawaki
Google Chrome Windows 7好的,我再尝试看看。
非常感谢
ABananas
MicroSoft Edge Windows 10木灵鱼儿
FireFox Windows 10