This commit is contained in:
Kovid Goyal 2013-03-18 14:11:40 +05:30
parent f5849facca
commit ac450fb04b

View File

@ -35,7 +35,10 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
continue continue
if x['class'] in {'story', 'ledeStory'}: if x['class'] in {'story', 'ledeStory'}:
tt = 'h3' if x['class'] == 'story' else 'h1' tt = 'h3' if x['class'] == 'story' else 'h1'
a = x.find(tt).find('a', href=True) try:
a = x.find(tt).find('a', href=True)
except AttributeError:
continue
title = self.tag_to_string(a) title = self.tag_to_string(a)
url = a['href'] + '&pagewanted=all' url = a['href'] + '&pagewanted=all'
self.log('\tFound article:', title, url) self.log('\tFound article:', title, url)