From ac450fb04b2a6e21a8f9acd63174cc36dcb94aa8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 18 Mar 2013 14:11:40 +0530 Subject: [PATCH] ... --- recipes/nytimesbook.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/nytimesbook.recipe b/recipes/nytimesbook.recipe index ad20586770..2d8fb69a7e 100644 --- a/recipes/nytimesbook.recipe +++ b/recipes/nytimesbook.recipe @@ -35,7 +35,10 @@ class NewYorkTimesBookReview(BasicNewsRecipe): continue if x['class'] in {'story', 'ledeStory'}: 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) url = a['href'] + '&pagewanted=all' self.log('\tFound article:', title, url)