From 6cd7aeb64f3403ae1953abcdbf2a28063176601f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Feb 2012 08:31:39 +0530 Subject: [PATCH] ... --- recipes/chicago_tribune.recipe | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/chicago_tribune.recipe b/recipes/chicago_tribune.recipe index 4fada40133..a5ec8f0743 100644 --- a/recipes/chicago_tribune.recipe +++ b/recipes/chicago_tribune.recipe @@ -82,6 +82,14 @@ class ChicagoTribune(BasicNewsRecipe): url = url.partition('?')[0] return url + def skip_ad_pages(self, soup): + text = soup.find(text='click here to continue to article') + if text: + a = text.parent + url = a.get('href') + if url: + return self.index_to_soup(url, raw=True) + def postprocess_html(self, soup, first_fetch): # Remove the navigation bar. It was kept until now to be able to follow # the links to further pages. But now we don't need them anymore.