From d3af9a0440d75627f69dd561acb3e31b0fb6ed9d Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Tue, 15 Jul 2014 10:41:45 +0100 Subject: Fix businessweek.com. --- businessweek.com.txt | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/businessweek.com.txt b/businessweek.com.txt index 0308559..f546b70 100644 --- a/businessweek.com.txt +++ b/businessweek.com.txt @@ -1,30 +1,17 @@ -# story has several pages, should be detected -body: //div[@id='storyBody'] -body: //div[@id='article_body'] -body: //div[@id='story_body'] +# include the lead graphic in the body, if available +body: //div[contains(concat(' ', normalize-space(@id), ' '), ' lead_graphic ')] | //div[contains(concat(' ', normalize-space(@itemprop), ' '), ' articleBody ')] +title: //h1[contains(concat(' ', normalize-space(@itemprop), ' '), ' headline ')] +date: //time[contains(concat(' ', normalize-space(@itemprop), ' '), ' datePublished ')] -title://h1[@id='article_headline'] - -# article author -author: //p[@class='author']/a -# story author(s) -author: substring-after(//p[@class='byline'], 'By ') - -# article date -date: //span[@class='published_date'] -# story date -date: //span[@class='date'] - -date: substring-after(//div[contains(@class,'attributor')],'on') -strip_id_or_class: inset -strip: //p/span[@class='photoCredit'] -strip: //h1 - -strip_id_or_class: page_count -strip_id_or_class: tools -strip_id_or_class: pagination - -single_page_link: //li[@id='stPrint']/a +strip_id_or_class: photo_credit +strip_id_or_class: photo_caption +strip_id_or_class: inline_gallery +# pull quote, often inside a blockquote element +strip_id_or_class: pq +strip_id_or_class: credit +strip_id_or_class: figcaption +strip_id_or_class: related_item test_url: http://www.businessweek.com/magazine/buyback-insurance-a-good-deal-for-retailers-07282011.html -test_url: http://www.businessweek.com/articles/2012-06-06/american-pain-the-largest-u-dot-s-dot-pill-mills-rise-and-fall \ No newline at end of file +test_url: http://www.businessweek.com/articles/2012-06-06/american-pain-the-largest-u-dot-s-dot-pill-mills-rise-and-fall +test_url: http://www.businessweek.com/articles/2014-07-09/american-apparel-dov-charneys-sleazy-struggle-for-control -- cgit v1.3.1