From 40dd94b0e7b2b7da655d2370bfeda82ab67090d2 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 30 May 2016 10:53:58 +0200 Subject: Fix pagination for JDG sites (#169) * Fix pagination for JDG sites All pages have a ' next ' link to view the next content, not the next page. But contents with more than one page also got this link but it's not embedded in `single-test` class node. So we first remove that block and we found the ' next ' content, it means it's multipage article. * Fix next link xpath --- jdubuzz.com.txt | 9 +++++---- journaldugamer.com.txt | 7 ++++--- journaldugeek.com.txt | 7 ++++--- news.pixelistes.com.txt | 7 ++++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/jdubuzz.com.txt b/jdubuzz.com.txt index ddae23f..9d18826 100644 --- a/jdubuzz.com.txt +++ b/jdubuzz.com.txt @@ -3,11 +3,12 @@ # Source: http://siteconfig.fivefilters.org/grab.php?url=http://www.journaldugeek.com/2015/09/09/apple-ipad-pro/ date: //meta[@property="og:updated_time"]/@content -next_page_link: //div[contains(concat(' ',normalize-space(@class),' '),' pagination ')]/a[contains(concat(' ',normalize-space(@class),' '),' next ')] +next_page_link: //div[@class="post-content"]/div[@class='row pagination']/a[contains(concat(' ',normalize-space(@class),' '),' next ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' jdg-recommend ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' proofreader-bloc ')] +strip_id_or_class: jdg-recommend +strip_id_or_class: proofreader-bloc +strip_id_or_class: single-test body: //div[contains(concat(' ',normalize-space(@class),' '),' post-content ')] test_url: http://www.jdubuzz.com/2015/09/11/le-meilleur-du-jduzap-cest-maintenant/ -test_url: http://www.jdubuzz.com/tests/les-20-comptes-instagram-des-filles-les-plus-sexy-a-suivre-en-2016/ \ No newline at end of file +test_url: http://www.jdubuzz.com/tests/les-20-comptes-instagram-des-filles-les-plus-sexy-a-suivre-en-2016/ diff --git a/journaldugamer.com.txt b/journaldugamer.com.txt index e3baaa1..31ba7cd 100644 --- a/journaldugamer.com.txt +++ b/journaldugamer.com.txt @@ -3,10 +3,11 @@ # Source: http://siteconfig.fivefilters.org/grab.php?url=http://www.journaldugeek.com/2015/09/09/apple-ipad-pro/ date: //meta[@property="og:updated_time"]/@content -next_page_link: //div[contains(concat(' ',normalize-space(@class),' '),' pagination ')]/a[contains(concat(' ',normalize-space(@class),' '),' next ')] +next_page_link: //div[@class="post-content"]/div[@class='row pagination']/a[contains(concat(' ',normalize-space(@class),' '),' next ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' jdg-recommend ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' proofreader-bloc ')] +strip_id_or_class: jdg-recommend +strip_id_or_class: proofreader-bloc +strip_id_or_class: single-test body: //div[contains(concat(' ',normalize-space(@class),' '),' post-content ')] test_url: http://www.journaldugamer.com/2015/09/14/financier-desormais-tete-nintendo/ diff --git a/journaldugeek.com.txt b/journaldugeek.com.txt index 9af13b0..69327c5 100644 --- a/journaldugeek.com.txt +++ b/journaldugeek.com.txt @@ -3,10 +3,11 @@ # Source: http://siteconfig.fivefilters.org/grab.php?url=http://www.journaldugeek.com/2015/09/09/apple-ipad-pro/ date: //meta[@property="og:updated_time"]/@content -next_page_link: //div[contains(concat(' ',normalize-space(@class),' '),' pagination ')]/a[contains(concat(' ',normalize-space(@class),' '),' next ')] +next_page_link: //div[@class="post-content"]/div[@class='row pagination']/a[contains(concat(' ',normalize-space(@class),' '),' next ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' jdg-recommend ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' proofreader-bloc ')] +strip_id_or_class: jdg-recommend +strip_id_or_class: proofreader-bloc +strip_id_or_class: single-test body: //div[contains(concat(' ',normalize-space(@class),' '),' post-content ')] test_url: http://www.journaldugeek.com/2015/09/09/apple-ipad-pro/ diff --git a/news.pixelistes.com.txt b/news.pixelistes.com.txt index 898eb06..50783a9 100644 --- a/news.pixelistes.com.txt +++ b/news.pixelistes.com.txt @@ -3,10 +3,11 @@ # Source: http://siteconfig.fivefilters.org/grab.php?url=http://www.journaldugeek.com/2015/09/09/apple-ipad-pro/ date: //meta[@property="og:updated_time"]/@content -next_page_link: //div[contains(concat(' ',normalize-space(@class),' '),' pagination ')]/a[contains(concat(' ',normalize-space(@class),' '),' next ')] +next_page_link: //div[@class="post-content"]/div[@class='row pagination']/a[contains(concat(' ',normalize-space(@class),' '),' next ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' jdg-recommend ')] -strip: //div[contains(concat(' ',normalize-space(@class),' '),' proofreader-bloc ')] +strip_id_or_class: jdg-recommend +strip_id_or_class: proofreader-bloc +strip_id_or_class: single-test body: //div[contains(concat(' ',normalize-space(@class),' '),' post-content ')] test_url: http://news.pixelistes.com/pixelistes-partenaire-du-salon-de-la-photo-de-paris/ -- cgit v1.3.1