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
206 stars 34 forks source link

Problems with rule #129

Closed Carsten3000 closed 5 years ago

Carsten3000 commented 5 years ago

Hello,

at this website

https://www.heise.de/newsticker/meldung/Lohnangleichung-bei-Google-Maenner-staerker-unterbezahlt-4326808.html?wt_mc=rss.ho.beitrag.atom

i am having trouble blocking this part:

image

my code: { "type": "xpath", "xpath": [ "article[contains(@class,'article-layout')]" ], "multipage": { "xpath": "a[@rel='nofollow' and @class='pagination-all-on-one-page__link']", "append": false }, "cleanup": [ "div[contains(@class,'article-header__publish-info')]", "div[contains(@class,'article-actions')]", "aside[contains(@class,'top-ad-container')]", "aside[contains(@class,'akwa-ad-container')]", "section[contains(@class,'article-sidebar')]" ] }

Why doesnt my "section[contains(@class,'article-sidebar')]" not work?

I really appreciate any help you can provide.

de-es commented 5 years ago

It does look like it isn't cleaned up but in fact it is. There are two instances of the same content for responsive design reasons. Just add "a-collapse" to your cleanup.

dugite-code commented 5 years ago

@Carsten3000 as @de-es has pointed out it's caused by responsive design issues using a catch-all contains xpath looks to be your best bet "*[contains(@class,'collapse-box')]"

{
    "type": "xpath",
    "xpath": [
        "article[contains(@class,'article-layout')]"
    ],
    "multipage": {
        "xpath": "a[@rel='nofollow' and @class='pagination-all-on-one-page__link']",
        "append": false
    },
    "cleanup": [
        "div[contains(@class,'article-header__publish-info')]",
        "div[contains(@class,'article-actions')]",
        "aside[contains(@class,'top-ad-container')]",
        "aside[contains(@class,'akwa-ad-container')]",
        "section[contains(@class,'article-sidebar')]",
        "*[contains(@class,'collapse-box')]",
        "footer"
    ]
}