From b6c7d705c0109d12b785ab98169670bc3d503e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Thu, 16 Jan 2020 03:10:08 +0100 Subject: [PATCH] fix pinned postings --- configuration.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configuration.go b/configuration.go index c1daf13..4e65942 100644 --- a/configuration.go +++ b/configuration.go @@ -14,7 +14,9 @@ const ( // xPath constants const ( - xPathArticle string = `(//*/article[contains(concat(" ", normalize-space(@class)," "), " _55wo ") and contains(concat(" ", normalize-space(@class)," "), " _5rgr ")])[1]` + //xPathArticle string = `(//*/article[contains(concat(" ", normalize-space(@class)," "), " _55wo ") and contains(concat(" ", normalize-space(@class)," "), " _5rgr ")])[1]` + xPathArticle string = `(//*/article[contains(concat(" ", normalize-space(@class)," "), " _55wo ") and contains(concat(" ", normalize-space(@class)," "), " _5rgr ") and not(following-sibling::i)])[1]` + //xPathPinnedArticle string = xPathArticle + `/following-sibling::i[contains(concat(" ", normalize-space(@class)," "), " _3drp ") and contains(concat(" ", normalize-space(@class)," "), " _4q4l ")]` xPathArticleContent string = xPathArticle + `/div/div[contains(concat(" ", normalize-space(@class)," "), " _5rgt ") and contains(concat(" ", normalize-space(@class)," "), " _5nk5 ")]/span` xPathImageURL string = xPathArticle + `/div/div[2]/div[1]/a/div/div/i` xPathImageURL2 string = xPathArticle + `/div/div[2]/section/div/i`