From 619f45711292205a5ec4a113fae70952fe3b8af2 Mon Sep 17 00:00:00 2001 From: Allan Simonsen Date: Sun, 2 Oct 2016 14:03:43 +0200 Subject: [PATCH] Fixed bug #1529990. Recipe nakedcapitalism.recipe now works again. --- recipes/nakedcapitalism.recipe | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/recipes/nakedcapitalism.recipe b/recipes/nakedcapitalism.recipe index 5c47802d32..18de3bf73c 100644 --- a/recipes/nakedcapitalism.recipe +++ b/recipes/nakedcapitalism.recipe @@ -1,11 +1,10 @@ #!/usr/bin/env python2 - +from calibre.web.feeds.news import BasicNewsRecipe __license__ = 'GPL v3' __copyright__ = '2009, Darko Miletic ' ''' www.nakedcapitalism.com ''' -from calibre.web.feeds.news import BasicNewsRecipe class nakedcapitalism(BasicNewsRecipe): @@ -20,17 +19,25 @@ class nakedcapitalism(BasicNewsRecipe): use_embedded_content = False encoding = 'utf-8' language = 'en' - extra_css = ' #BlogTitle{font-size: x-large; font-weight: bold} #BlogDate{font-size: small} ' + extra_css = (' #BlogTitle{font-size: x-large; font-weight: bold}' + ' #BlogDate{font-size: small} ') + auto_claenup = False conversion_options = { - 'comment': description, 'tags': category, 'publisher': publisher, 'language': language + 'comment': description, + 'tags': category, + 'publisher': publisher, + 'language': language } - feeds = [(u'Articles', u'http://www.nakedcapitalism.com/feed')] + feeds = [ + (u'Articles', u'http://www.nakedcapitalism.com/feed'), + (u'Comments', u'http://www.nakedcapitalism.com/comments/feed'), + ] keep_only_tags = [ - dict(name='h3', attrs={'class': 'post-title entry-title'} - ), dict(name='div', attrs={'class': 'entry'}) + dict(name='header', attrs={'class': 'entry-header'}), + dict(name='div', attrs={'class': 'pf-content'}) ] remove_tags = [dict(name=['object', 'link', 'base'])]