Debian Codegraph @

recipes/disinformatico.recipe

raw
1 from calibre.web.feeds.news import BasicNewsRecipe
2
3
4 class Disinformatico(BasicNewsRecipe):
5 title = 'Il Disinformatico - Paolo Attivissimo'
6 oldest_article = 7
7 max_articles_per_feed = 25
8 auto_cleanup = False
9 use_embedded_content = False
10 description = 'Un blog di Paolo Attivissimo, giornalista informatico e cacciatore di bufale'
11 publisher = 'http://attivissimo.blogspot.it'
12 language = 'it'
13 __author__ = 'isspro'
14 publication_type = 'blog'
15
16 conversion_options = {
17 'title': title,
18 'comments': description,
19 'language': language,
20 'publisher': 'Paolo Attivissimo',
21 'authors': 'Paolo Attivissimo',
22 'smarten_punctuation': True,
23 }
24
25 keep_only_tags = [dict(name='div', attrs={'class': 'post hentry'})]
26
27 remove_tags = [dict(name='span', attrs={'id': 'NumCom'}), dict(name='div', attrs={'id': 'PostFooter'})]
28
29 extra_css = '''
30 h1 {font-size:x-large;}
31 .post-body {margin: 0pt;}
32 .post-timestamp {margin-right: 0pt;}
33 '''
34
35 def parse_feeds(self):
36 feeds = BasicNewsRecipe.parse_feeds(self)
37 # Loop through all feeds.
38 for feed in feeds:
39 # Loop through all articles in feed.
40 for article in feed.articles[:]:
41 if 'podcast' in article.title:
42 feed.articles.remove(article)
43
44 return feeds
45
46 feeds = [('Home', 'http://feeds.feedburner.com/Disinformatico')]