From 38380ac5929b77ee5e9d8dd8b2c990de1f68d8ef Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 18 May 2012 10:19:12 +0530 Subject: [PATCH] ... --- recipes/ars_technica.recipe | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/ars_technica.recipe b/recipes/ars_technica.recipe index 9d44f8cf55..cef96915e6 100644 --- a/recipes/ars_technica.recipe +++ b/recipes/ars_technica.recipe @@ -4,9 +4,8 @@ __copyright__ = '2008-2012, Darko Miletic ' arstechnica.com ''' -import re from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag +from calibre.ebooks.BeautifulSoup import BeautifulSoup class ArsTechnica(BasicNewsRecipe): title = u'Ars Technica' @@ -21,7 +20,7 @@ class ArsTechnica(BasicNewsRecipe): encoding = 'utf-8' use_embedded_content = False remove_empty_feeds = True - publication_type = 'newsportal' + publication_type = 'newsportal' extra_css = ''' body {font-family: Arial,sans-serif} .heading{font-family: "Times New Roman",serif} @@ -49,7 +48,7 @@ class ArsTechnica(BasicNewsRecipe): ] remove_attributes = ['lang'] - + feeds = [ (u'Infinite Loop (Apple content)' , u'http://feeds.arstechnica.com/arstechnica/apple/' ) ,(u'Opposable Thumbs (Gaming content)' , u'http://feeds.arstechnica.com/arstechnica/gaming/' ) @@ -93,9 +92,9 @@ class ArsTechnica(BasicNewsRecipe): item.replaceWith(str) for item in soup.findAll('img'): if not item.has_key('alt'): - item['alt'] = 'image' + item['alt'] = 'image' return soup def preprocess_raw_html(self, raw, url): return ''+raw[raw.find(''):] - \ No newline at end of file +