Debian Codegraph @

recipes/futurismic.recipe

raw
1 __license__ = 'GPL v3'
2 __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
3 '''
4 futurismic.com
5 '''
6
7 from calibre.web.feeds.news import BasicNewsRecipe
8
9
10 class Futurismic(BasicNewsRecipe):
11 title = 'Futurismic'
12 __author__ = 'Darko Miletic'
13 description = 'Near-future science fiction and fact since 2001'
14 oldest_article = 15
15 max_articles_per_feed = 100
16 language = 'en'
17 encoding = 'utf-8'
18 no_stylesheets = True
19 use_embedded_content = False
20 publication_type = 'blog'
21 extra_css = ' body{font-family: Arial,Verdana,sans-serif} '
22
23 conversion_options = {'comment': description, 'tags': 'blog, sf', 'publisher': 'Futurismic', 'language': language}
24
25 remove_attributes = ['width', 'height']
26 keep_only_tags = [dict(attrs={'class': ['post', 'commentlist']})]
27 remove_tags = [dict(attrs={'class': ['sociable', 'feedback', 'tagwords']})]
28 feeds = [('Posts', 'http://feeds2.feedburner.com/futurismic_feed')]
29
30 def preprocess_html(self, soup):
31 return self.adeify_images(soup)