Debian Codegraph @

recipes/dailyreckoning.recipe

raw
1 #!/usr/bin/env python
2
3 __license__ = 'GPL v3'
4 __copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
5 '''
6 dailyreckoning.com
7 '''
8 from calibre.web.feeds.news import BasicNewsRecipe
9
10
11 class dailyreckoning_us(BasicNewsRecipe):
12 title = 'The Daily Reckoning - US edition'
13 __author__ = 'Darko Miletic'
14 description = 'Worldwide business and financial news and articles'
15 publisher = 'Agora Financial, LLC.'
16 category = 'news, business, finances, money, banking'
17 oldest_article = 7
18 max_articles_per_feed = 100
19 no_stylesheets = True
20 use_embedded_content = False
21 encoding = 'utf-8'
22 language = 'en_US'
23 extra_css = ' #BlogTitle{font-size: x-large; font-weight: bold} #BlogDate{font-size: small} '
24
25 conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language}
26
27 feeds = [('Articles', 'http://feeds.feedburner.com/dailyreckoning?format=xml')]
28
29 keep_only_tags = [dict(name='div', attrs={'id': 'Outline'})]
30
31 remove_tags = [dict(name=['object', 'link', 'base']), dict(name='hr', attrs={'class': 'Divider'})]
32
33 remove_tags_after = dict(name='hr', attrs={'class': 'Divider'})
34
35 def get_article_url(self, article):
36 return article.get('feedburner_origlink', article.get('link'))
37
38 def print_version(self, url):
39 return url + 'print/'