From 87eeefe9a1fa4d55c93a209314dcc5834a2e2391 Mon Sep 17 00:00:00 2001 From: Jordi De Groof Date: Mon, 31 Aug 2015 17:19:45 +0200 Subject: All sites in the IDG network have the same structure --- computerworld.com.txt | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'computerworld.com.txt') diff --git a/computerworld.com.txt b/computerworld.com.txt index 7f20a4d..9898309 100644 --- a/computerworld.com.txt +++ b/computerworld.com.txt @@ -1,22 +1,17 @@ -title: //meta[@name='headline']/@content -date: //meta[@name='date']/@content -author: //meta[@name='author']/@content -body: //div[contains(@class, 'article')] -body://div[@id="article_body"] +# All sites of the IDG network can be extracted using the same rules, +# make sure to update all of them -strip_id_or_class: banner -strip: //noscript -strip: //div[@style='width:1px;height:130px;float:right;'] -strip: //div[@class='storyby'] -strip_image_src: twitter_icon -strip_image_src: rss_bug +author: //meta[@name="author"]/@content +date: //meta[@name="DC.date.issued"]/@content -tidy: no -prune: no +body: //div[@itemprop="articleBody"] +body: //div[@itemprop="reviewBody"] +body: //figcaption|//div[@class="img-wrapper"]/noscript/img -next_page_link://div[@id="next_page"]/a +next_page_link: //a[@rel="next"] -single_page_link: concat('http://www.computerworld.com/s/article/print/', substring-after(//link[@rel='canonical']/@href, '/s/article/')) - -test_url: http://www.computerworld.com/s/article/9224348/Apple_s_new_OS_X_tightens_screws_on_some_malware -test_url: http://www.computerworld.com/s/article/9227679/Windows_8_Release_Preview_Updated_but_still_uneasy \ No newline at end of file +strip: //aside +strip: //h3[contains(., "See also:")] +strip: //div[@id="article-top-page-number"] +strip: //p[starts-with(normalize-space(.), '[')] +strip: //p[starts-with(normalize-space(.), '+')] -- cgit v1.3.1