From 148df09652f12495c0686f069b25b98cb8fd6779 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Feb 2020 19:20:48 +0530 Subject: [PATCH] pep8 --- recipes/spectator-au.recipe | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/recipes/spectator-au.recipe b/recipes/spectator-au.recipe index 3e8bd16cab..735d9460a7 100644 --- a/recipes/spectator-au.recipe +++ b/recipes/spectator-au.recipe @@ -3,9 +3,9 @@ __copyright__ = '2011, Pat Stapleton ' ''' https://www.spectator.com.au/ ''' -import re from calibre.web.feeds.recipes import BasicNewsRecipe + class SpectatorAU(BasicNewsRecipe): title = 'Spectator Australia' __author__ = 'Pat Stapleton, Dean Cording, James Cridland' @@ -24,13 +24,28 @@ class SpectatorAU(BasicNewsRecipe): publication_type = 'newspaper' extra_css = '.article-header__author{margin-bottom:20px;}' conversion_options = { - 'comments': description, 'tags': category, 'language': language, 'publisher': publisher, 'linearize_tables': False + 'comments': description, + 'tags': category, + 'language': language, + 'publisher': publisher, + 'linearize_tables': False } keep_only_tags = [dict(attrs={'class': ['article']})] - remove_tags = [dict(attrs={'class': ['big-author','article-header__category','margin-menu','related-stories','disqus_thread','middle-promo','show-comments','article-tags']}), dict(name=['h4','hr'])] + remove_tags = [ + dict( + attrs={ + 'class': [ + 'big-author', 'article-header__category', 'margin-menu', + 'related-stories', 'disqus_thread', 'middle-promo', + 'show-comments', 'article-tags' + ] + } + ), + dict(name=['h4', 'hr']) + ] remove_attributes = ['width', 'height'] feeds = [ ('Spectator Australia', 'https://www.spectator.com.au/feed/'), - ] + ]