Added Spectator Australia

A new recipe for Spectator Australia.
This commit is contained in:
James Cridland 2020-02-25 22:51:41 +10:00
parent c7a59fc921
commit ba928291b9
2 changed files with 36 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,36 @@
__license__ = 'GPL v3'
__copyright__ = '2011, Pat Stapleton <pat.stapleton at gmail.com>'
'''
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'
description = 'Spectator Australia is an Australian edition of The Spectator, first published in the UK in July 1828.'
masthead_url = 'https://www.spectator.com.au/content/themes/spectator-australia/assets/images/spec-aus-logo.png'
cover_url = 'https://spectator.imgix.net/content/uploads/2015/10/Spectator-Australia-Logo.jpg'
oldest_article = 7
handle_gzip = True
no_stylesheets = True
use_embedded_content = False
scale_news_images_to_device = True
encoding = 'utf8'
publisher = 'Spectator Australia'
category = 'Australia,News'
language = 'en_AU'
publication_type = 'newspaper'
extra_css = '.article-header__author{margin-bottom:20px;}'
conversion_options = {
'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_attributes = ['width', 'height']
feeds = [
('Spectator Australia', 'https://www.spectator.com.au/feed/'),
]