Skip to content

Multipage with different possibilities of xpath #180

@goncaloruao

Description

@goncaloruao

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions