PureDark / H-Viewer

An android feed reader application which fetch data with selector and regular expression.
Apache License 2.0
1.74k stars 236 forks source link

紳士漫畫站本身的bug的解決方案 #135

Closed reply7251 closed 2 months ago

reply7251 commented 1 year ago

紳士漫畫有時候會有頁面變成手機版,導致無法正常分析,所以在indexRule裡面增加了選擇手機版的元素的選擇器。 主要修改內容:

"indexRule": {
        "cover": {
            "regex": "([^\"]*\\.(?:jpg|jpeg|png|gif|bmp|webp))",
            "selector": "div.pic_box a img, a.ImgA img"
        },
        "datetime": {
            "fun": "text",
            "regex": "(\\d{4}-\\d{2}-\\d{2})",
            "selector": "div.info div.info_col, span.info"
        },
        "idCode": {
            "fun": "attr",
            "param": "href",
            "regex": "aid-(\\d+)",
            "selector": "div.pic_box a, a.ImgA"
        },
        "item": {
            "selector": "div.gallary_wrap ul li.gallary_item, div.imgBox ul li"
        },
        "title": {
            "fun": "text",
            "selector": "div.info div.title a, a.txtA"
        }
    }

完整規則

{
    "categories": [
        {
            "cid": 1,
            "title": "首页",
            "url": "https://wnacg.org/albums-index-page-{page:1}.html"
        },
        {
            "cid": 2,
            "title": "同人志",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-5.html"
        },
        {
            "cid": 3,
            "title": "同人志->汉化",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-1.html"
        },
        {
            "cid": 4,
            "title": "同人志->日语",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-12.html"
        },
        {
            "cid": 5,
            "title": "同人志->CG画集",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-2.html"
        },
        {
            "cid": 6,
            "title": "同人志->Cosplay",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-3.html"
        },
        {
            "cid": 7,
            "title": "单行本",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-6.html"
        },
        {
            "cid": 8,
            "title": "单行本->汉化",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-9.html"
        },
        {
            "cid": 9,
            "title": "单行本->日语",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-13.html"
        },
        {
            "cid": 10,
            "title": "杂志",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-7.html"
        },
        {
            "cid": 11,
            "title": "杂志->单篇汉化",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-10.html"
        },
        {
            "cid": 12,
            "title": "杂志->日语",
            "url": "https://wnacg.org/albums-index-page-{page:1}-cate-14.html"
        }
    ],
    "disableHProxy": false,
    "extraRule": {
        "pictureRule": {
            "url": {
                "fun": "attr",
                "param": "src",
                "selector": "img#picarea"
            }
        }
    },
    "flag": "singlePageBigPicture|noRating|noTag|waterfallAsList|waterfallAsGrid",
    "galleryRule": {
        "description": {
            "fun": "html",
            "selector": "div.uwconn > p:last-child"
        },
        "pictureRule": {
            "item": {
                "selector": "div.gallary_wrap ul li.gallary_item div.pic_box"
            },
            "thumbnail": {
                "regex": "([^\"]*\\.(?:jpg|jpeg|png|gif|bmp|webp))",
                "selector": "a img"
            },
            "url": {
                "fun": "attr",
                "param": "href",
                "selector": "a"
            }
        }
    },
    "galleryUrl": "https://wnacg.org/photos-index-page-{page:1}-aid-{idCode:}.html",
    "gid": 1,
    "index": 0,
    "indexRule": {
        "cover": {
            "regex": "([^\"]*\\.(?:jpg|jpeg|png|gif|bmp|webp))",
            "selector": "div.pic_box a img, a.ImgA img"
        },
        "datetime": {
            "fun": "text",
            "regex": "(\\d{4}-\\d{2}-\\d{2})",
            "selector": "div.info div.info_col, span.info"
        },
        "idCode": {
            "fun": "attr",
            "param": "href",
            "regex": "aid-(\\d+)",
            "selector": "div.pic_box a, a.ImgA"
        },
        "item": {
            "selector": "div.gallary_wrap ul li.gallary_item, div.imgBox ul li"
        },
        "title": {
            "fun": "text",
            "selector": "div.info div.title a, a.txtA"
        }
    },
    "indexUrl": "https://wnacg.org/albums-index-page-{page:1}.html",
    "isGrid": false,
    "loginUrl": "https://wnacg.org/users-login.html",
    "searchUrl": "https://wnacg.org/search/?q={keyword:}&f=_all&s=create_time_DESC&p={page:1}",
    "sid": 1,
    "title": "绅士漫画",
    "versionCode": 10
}
kofal2012 commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

LRL200056 commented 1 year ago

大佬,进不去啊,可以帮忙看一下吗,球球了

reply7251 commented 1 year ago

.org的沒了 要用.com

LRL200056 commented 1 year ago

.com下午就试过了,大佬,主要问题是预览的略缩图可以看到,但是点进去就加载不出来,而且也搜索加载不出来

reply7251 commented 1 year ago

我自己是把.org全換成.com就可以用了

LRL200056 commented 1 year ago

好的,谢谢大佬了

---原始邮件--- 发件人: @.> 发送时间: 2023年5月31日(周三) 晚上9:31 收件人: @.>; 抄送: @.**@.>; 主题: Re: [PureDark/H-Viewer] 紳士漫畫站本身的bug的解決方案 (Issue #135)

我自己是把.org全換成.com就可以用了

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

heiheirx commented 2 months ago

请教一下绅士漫画的规则怎么显示本子的页数?

kofal2012 commented 2 months ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。