From 32ed063b5b83c3ce8fb714e3615e4ab8c683c93e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 22 Mar 2011 18:38:07 -0600 Subject: [PATCH] ... --- recipes/lwn_weekly.recipe | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/lwn_weekly.recipe b/recipes/lwn_weekly.recipe index 2412449805..7363062346 100644 --- a/recipes/lwn_weekly.recipe +++ b/recipes/lwn_weekly.recipe @@ -7,7 +7,6 @@ lwn.net ''' from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup import re class WeeklyLWN(BasicNewsRecipe): @@ -54,7 +53,6 @@ class WeeklyLWN(BasicNewsRecipe): articles = {} ans = [] - old_section = None url_re = re.compile('^/Articles/') while True: @@ -84,7 +82,7 @@ class WeeklyLWN(BasicNewsRecipe): if tag_url == None: break body = tag_url - if tag_url.string == None: + if tag_url.string == None: continue elif tag_url.string == 'Full Story': break @@ -95,7 +93,7 @@ class WeeklyLWN(BasicNewsRecipe): if tag_url == None: break - + article = dict( title=tag_title.string, url= 'http://lwn.net' + tag_url['href'].split('#')[0] + '?format=printable',