Debian Codegraph @

recipes/spectator-au.recipe

raw
1 __license__ = 'GPL v3'
2 __copyright__ = '2011, Pat Stapleton <pat.stapleton at gmail.com>'
3 '''
4 https://www.spectator.com.au/
5 '''
6 from calibre.web.feeds.recipes import BasicNewsRecipe
7
8
9 class SpectatorAU(BasicNewsRecipe):
10 title = 'Spectator Australia'
11 __author__ = 'Pat Stapleton, Dean Cording, James Cridland'
12 description = 'Spectator Australia is an Australian edition of The Spectator, first published in the UK in July 1828.'
13 masthead_url = 'https://www.spectator.com.au/content/themes/spectator-australia/assets/images/spec-aus-logo.png'
14 cover_url = 'https://spectator.imgix.net/content/uploads/2015/10/Spectator-Australia-Logo.jpg'
15 oldest_article = 7
16 handle_gzip = True
17 no_stylesheets = True
18 use_embedded_content = False
19 scale_news_images_to_device = True
20 encoding = 'utf8'
21 publisher = 'Spectator Australia'
22 category = 'Australia,News'
23 language = 'en_AU'
24 publication_type = 'newspaper'
25 extra_css = '.article-header__author{margin-bottom:20px;}'
26 conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher, 'linearize_tables': False}
27
28 keep_only_tags = [dict(attrs={'class': ['article']})]
29 remove_tags = [
30 dict(
31 attrs={
32 'class': [
33 'big-author',
34 'article-header__category',
35 'margin-menu',
36 'related-stories',
37 'disqus_thread',
38 'middle-promo',
39 'show-comments',
40 'article-tags',
41 ]
42 }
43 ),
44 dict(name=['h4', 'hr']),
45 ]
46 remove_attributes = ['width', 'height']
47
48 feeds = [
49 ('Spectator Australia', 'https://www.spectator.com.au/feed/'),
50 ]