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

Multipage with different possibilities of xpath #180

Open
goncaloruao opened this issue May 9, 2022 · 1 comment
Open

Multipage with different possibilities of xpath #180

goncaloruao opened this issue May 9, 2022 · 1 comment

Comments

@goncaloruao
Copy link

goncaloruao commented May 9, 2022

Expected Behavior

When i use feediron multipage,The first link has a different xpath than the rest links and i don't know how to apply two xpaths on the multipage config. I tried applying "and" and "or" but without success.

Current Behavior

What is the current behavior?

Steps to Reproduce

I'm trying to open this link :
https://www.nit.pt/nittravel/ultima-chamada-lisboa-gran-canaria-por-430e-num-hotel-de-4-estrelas

with this config :

{
    "type": "xpath",
    "tidy-source": "bool",
    "multipage": {
        "xpath": "a[@class='btnSeeGal'] ",
        "recursive": true,
        "append": true
    },
    "xpath": [
        "article"
    ],
    "cleanup": [
        "style",
        "div[@class='entry-date-categories-and-social']",
        "div[@class='author-ph']"
    ]
}

and it opens the first page of "the second page of the post" : https://www.nit.pt/nittravel/ultima-chamada-lisboa-gran-canaria-por-430e-num-hotel-de-4-estrelas/attachment/876879

What should i do to open the next ones ?

Because if i use

    "multipage": {
        "xpath": "div[contains(@class,'entry-collection-featured-image-next') ]\/\/a ",
        "recursive": true,
        "append": true
    }

on the second part of the post (https://www.nit.pt/nittravel/ultima-chamada-lisboa-gran-canaria-por-430e-num-hotel-de-4-estrelas/attachment/876879)

it opens all the following links.

I've already tried this but with no success:

"multipage": {
        "xpath": [
"a[@class='btnSeeGal'] ",
"div[contains(@class,'entry-collection-featured-image-next') ]\/\/a "
] , 
        "recursive": true,
        "append": true
    }

Thanks in advance.

@dugite-code
Copy link
Contributor

dugite-code commented May 9, 2022

Currently multi-page isn't able to utilize an array of xpaths like fetching the article body can. I agree it would be a worthwhile feature improvement

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

No branches or pull requests

2 participants