From de06b05355c8029e5d01b074be7f4d436f09d2c2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 31 Dec 2010 19:34:42 -0700 Subject: [PATCH] Fix #8078 (smithsonian recipe not working) --- resources/recipes/smith.recipe | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/recipes/smith.recipe b/resources/recipes/smith.recipe index e52b2ee709..98f7d98517 100644 --- a/resources/recipes/smith.recipe +++ b/resources/recipes/smith.recipe @@ -17,8 +17,8 @@ class SmithsonianMagazine(BasicNewsRecipe): remove_tags = [ dict(name='iframe'), dict(name='div', attrs={'class':'article_sidebar_border'}), - dict(name='div', attrs={'id':['article_sidebar_border', 'most-popular_large']}), - #dict(name='ul', attrs={'class':'article-tools'}), + dict(name='div', attrs={'id':['article_sidebar_border', 'most-popular_large', 'most-popular-body_large']}), + ##dict(name='ul', attrs={'class':'article-tools'}), dict(name='ul', attrs={'class':'cat-breadcrumb col three last'}), ] @@ -37,16 +37,16 @@ class SmithsonianMagazine(BasicNewsRecipe): ] def preprocess_html(self, soup): - story = soup.find(name='div', attrs={'id':'article-left'}) - #td = heading.findParent(name='td') - #td.extract() + story = soup.find(name='div', attrs={'id':'article-body'}) + ##td = heading.findParent(name='td') + ##td.extract() soup = BeautifulSoup('t') body = soup.find(name='body') body.insert(0, story) return soup - def postprocess_html(self, soup, first): - for p in soup.findAll(id='articlePaginationWrapper'): p.extract() - if not first: - for div in soup.findAll(id='article-head'): div.extract() - return soup + #def postprocess_html(self, soup, first): + #for p in soup.findAll(id='articlePaginationWrapper'): p.extract() + #if not first: + #for div in soup.findAll(id='article-head'): div.extract() + #return soup