summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Anzinger <lukas@lukasanzinger.at>2016-02-17 22:13:58 +0100
committerLukas Anzinger <lukas@lukasanzinger.at>2016-02-17 22:18:53 +0100
commit33acc0ccf771e1645be821d1f33e7fe20b44f9a7 (patch)
tree47b2886425c18b7d63429cd4337151be2d2cb70e
parent064b3026104de21d530a60a658a4ecfbf1d054aa (diff)
downloadftr-site-config-33acc0ccf771e1645be821d1f33e7fe20b44f9a7.tar.gz
ftr-site-config-33acc0ccf771e1645be821d1f33e7fe20b44f9a7.zip
theguardian.com: Rewrite and fix author and date extraction.
-rw-r--r--theguardian.com.txt44
1 files changed, 28 insertions, 16 deletions
diff --git a/theguardian.com.txt b/theguardian.com.txt
index 738e7d3..0a21de2 100644
--- a/theguardian.com.txt
+++ b/theguardian.com.txt
@@ -1,20 +1,29 @@
-title: //div[@id='main-article-info']//h1
-body: //figure[contains(@itemprop, "associatedMedia")] | //div[contains(@class, "content__article-body")]
-body: //figure[contains(@itemprop, "associatedMedia")] | //div[contains(@itemprop, "articleBody")]
-date: //li[@class='publication']//time[@pubdate] | //li[@class='publication']//data[@pubdate]
-strip: //div[contains(@class, 'email-subscription')]
-strip: //div[contains(@class, 'kindleWidget')]
-#strip: //a[not(text())]
-strip_id_or_class: pocket-btn
-author: //li[@class='byline']
-native_ad_clue: //meta[@property="article:tag" and contains(@content, "Partner zone")]
-native_ad_clue: //meta[@property="video:tag" and contains(@content, "Partner zone")]
-prune: no
-tidy: no
+title: //h1[@itemprop='headline']
-parser: html5php
+body: //article
+strip: //article/header/div[contains(@class, 'content__header')]
+strip: //article/header/div[contains(@class, 'content__logo-container')]
+strip: //article//div[contains(@class, 'content__secondary-column')]
+strip: //article//aside
+strip: //article//div[contains(@class, 'block-share')]
+strip: //article//div[@class='submeta']
+strip: //article//span[contains(@class, 'inline-expand-image')]
+strip: //article//div[@class='kindleWidget']
+strip: //article//div[@class='email-subscription']
+strip: //article//script
+strip: //article//figure[contains(@class, 'element-audio')]
+strip: //article//a[contains(@style, 'display: none')]
+strip: //article/div[@class='paidfor-band']
-strip_id_or_class: -expand-
+author: //article//p[@class='byline']
+date: //article//time/@datetime
+strip: //article//div[contains(@class, 'content__meta-container')]
+
+native_ad_clue: //meta[@property='article:tag' and contains(@content, 'partner zone')]
+native_ad_clue: //meta[@property='video:tag' and contains(@content, 'partner zone')]
+
+prune: no
+tidy: no
test_url: http://www.theguardian.com/world/2013/oct/04/nsa-gchq-attack-tor-network-encryption
test_contains: The National Security Agency has made repeated attempts to develop
@@ -25,5 +34,8 @@ test_contains: In August, the editor of the Guardian rang me up and asked if I w
test_contains: As the second most senior judge in the country, Lord Hoffmann, said in 2004 about a previous version of our anti-terrorism laws
test_url: http://www.theguardian.com/commentisfree/2014/jun/15/britishness-search-identity-my-part-in-camerons-odyssey
+test_url: http://www.theguardian.com/world/2016/feb/17/ankara-explosion-turkey-injures-large-number-of-people-reports-say
+test_url: http://www.theguardian.com/uk-news/2016/feb/11/trident-the-british-question
+
# Native ad
-test_url: http://www.theguardian.com/sustainable-business/2014/jul/18/ben-jerry-turn-ice-cream-into-energy
+test_url: http://www.theguardian.com/sustainable-business/fairtrade-partner-zone/chocolate-cocoa-production-risk