Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加站点 #35

Open
strobenights opened this issue Jul 16, 2020 · 2 comments
Open

添加站点 #35

strobenights opened this issue Jul 16, 2020 · 2 comments

Comments

@strobenights
Copy link

strobenights commented Jul 16, 2020

照着模板瞎写了一个,ps:hentainexus是一个英文步兵本子站,图源来自fakku

{
    "title": "hentainexus",
    "indexUrl": "https://hentainexus.com/page/{page:1}",
    "galleryUrl": "https://hentainexus.com/view/{idCode:}",
    "searchUrl": "https://hentainexus.com/page/{page:1}?q={keyword:}",
    "loginUrl": "https://hentainexus.com/login",
    "flag": "noRating|singlePageBigPicture|preloadGallery",
    "indexRule": {
        "item": {
            "selector": "div div.column"
        },
        "idCode": {
            "fun": "attr",
            "param": "href",
            "regex": "/view/(.*)",
            "selector": "a"
        },
        "title": {
            "fun": "attr",
            "param": "title",
            "selector": "a div.card header.card-header"
        },
        "cover": {
            "fun": "attr",
            "param": "src",
            "selector": "figure.image img"
        }
    },
    "galleryRule": {
        "pictureRule": {
            "item": {
                "selector": "section div:eq(1) div div div a"
            },
            "thumbnail": {
                "fun": "attr",
                "param": "src",
                "selector": "figure.image img"
            },
            "url": {
                "fun": "attr",
                "param": "href",
                "selector": "a"
            }
        },
        "tags": {
            "fun": "html",
            "selector": "td span a,table tbody tr:eq(0) td:eq(1) a"
        },
        "title": {
            "fun": "html",
            "selector": "h1.title"
        },
        "description": {
            "fun": "html",
            "selector": "table tbody tr:last-child td:last-child"
        },
        "category": {
            "fun": "html",
            "selector": "tbody tr:eq(3) td:last-child a"
        }
    },
    "extraRule": {
        "pictureRule": {
            "url": {
                "fun": "attr",
                "param": "src",
                "selector": "img#currImage"
            }
        }
    }
}
@PureDark
Copy link

回头有空加上

@strobenights
Copy link
Author

回头有空加上

过了半年发现不行了,怎么都抓取不到extraRule里的大图链接 T T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants