From ca5629beaab46d075d66c21c76d0a62540718d16 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 26 Mar 2013 10:20:36 +0530 Subject: [PATCH] Update Psychology Today --- recipes/psych.recipe | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/psych.recipe b/recipes/psych.recipe index a21acefe30..452573e23b 100644 --- a/recipes/psych.recipe +++ b/recipes/psych.recipe @@ -67,12 +67,13 @@ class PsychologyToday(BasicNewsRecipe): title = title + u' (%s)'%author article_page= self.index_to_soup('http://www.psychologytoday.com'+post.find('a', href=True)['href']) print_page=article_page.find('li', attrs={'class':'print_html first'}) - url='http://www.psychologytoday.com'+print_page.find('a',href=True)['href'] - desc = self.tag_to_string(post.find('div', attrs={'class':'collection-node-description'})).strip() - self.log('Found article:', title) - self.log('\t', url) - self.log('\t', desc) - articles.append({'title':title, 'url':url, 'date':'','description':desc}) + if print_page is not None: + url='http://www.psychologytoday.com'+print_page.find('a',href=True)['href'] + desc = self.tag_to_string(post.find('div', attrs={'class':'collection-node-description'})).strip() + self.log('Found article:', title) + self.log('\t', url) + self.log('\t', desc) + articles.append({'title':title, 'url':url, 'date':'','description':desc}) return [('Current Issue', articles)]