From 0dd72fe725ab3d37fa1d57b51fe327d3ed727876 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 13 Apr 2010 09:15:40 +0530 Subject: [PATCH] Fix #5290 (Atlantic Feed Broken) --- resources/recipes/atlantic.recipe | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/recipes/atlantic.recipe b/resources/recipes/atlantic.recipe index de6d4bc8d7..c3a4cef10d 100644 --- a/resources/recipes/atlantic.recipe +++ b/resources/recipes/atlantic.recipe @@ -77,13 +77,14 @@ class TheAtlantic(BasicNewsRecipe): if poems: feeds.append(('Poems', poems)) - self.log('Found section: Advice') div = soup.find(id='advice') - title = self.tag_to_string(div.find('h4')) - url = 'http://www.theatlantic.com'+div.find('a')['href'] - desc = self.tag_to_string(div.find('p')) - self.log('\tFound article:', title, 'at', url) - self.log('\t\t', desc) + if div is not None: + self.log('Found section: Advice') + title = self.tag_to_string(div.find('h4')) + url = 'http://www.theatlantic.com'+div.find('a')['href'] + desc = self.tag_to_string(div.find('p')) + self.log('\tFound article:', title, 'at', url) + self.log('\t\t', desc) feeds.append(('Advice', [{'title':title, 'url':url, 'description':desc, 'date':''}]))