feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
204 stars 34 forks source link

Multipage with different possibilities of xpath #180

Open goncaloruao opened 2 years ago

goncaloruao commented 2 years ago

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 commented 2 years ago

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