Debian Codegraph @

recipes/mail_and_guardian.recipe

raw
1 from calibre.web.feeds.news import BasicNewsRecipe
2
3
4 class AdvancedUserRecipe1295081935(BasicNewsRecipe):
5 title = 'Mail & Guardian ZA News'
6 __author__ = '77ja65'
7 language = 'en_ZA'
8 oldest_article = 7
9 max_articles_per_feed = 30
10 no_stylesheets = True
11 masthead_url = 'http://c1608832.cdn.cloudfiles.rackspacecloud.com/mg_logo.gif'
12 remove_tags_after = [dict(id='content')]
13
14 feeds = [
15 ('National News', 'http://www.mg.co.za/rss/national'),
16 ('Top Stories', 'http://www.mg.co.za/rss'),
17 ('Africa News', 'http://www.mg.co.za/rss/africa'),
18 ('Sport', 'http://www.mg.co.za/rss/sport'),
19 ('Business', 'http://www.mg.co.za/rss/business'),
20 ('And In Other News', 'http://www.mg.co.za/rss/and-in-other-news'),
21 ('World News', 'http://www.mg.co.za/rss/world'),
22 ]
23
24 def print_version(self, url):
25 return url.replace('http://www.mg.co.za/article/', 'http://www.mg.co.za/printformat/single/')
26
27 extra_css = '''
28 h1{font-family:Arial,Helvetica,sans-serif; font-
29 weight:bold;font-size:large;}
30 h2{font-family:Arial,Helvetica,sans-serif; font-
31 weight:normal;font-size:small;}
32 '''