Debian Codegraph @

recipes/fudzilla.recipe

raw
1 #!/usr/bin/env python
2
3 __license__ = 'GPL v3'
4 __copyright__ = '2010 Starson17'
5 '''
6 fudzilla.com
7 '''
8
9 import re
10
11 from calibre.web.feeds.news import BasicNewsRecipe
12
13
14 class Fudzilla(BasicNewsRecipe):
15 title = 'Fudzilla'
16 __author__ = 'Starson17'
17 language = 'en'
18
19 description = 'Tech news'
20 oldest_article = 7
21 remove_javascript = True
22 max_articles_per_feed = 100
23 no_stylesheets = True
24 use_embedded_content = False
25
26 remove_tags_before = dict(name='div', attrs={'class': ['padding']})
27
28 remove_tags = [
29 dict(name='td', attrs={'class': ['left', 'right']}),
30 dict(name='div', attrs={'id': ['toolbar', 'buttons']}),
31 dict(name='div', attrs={'class': ['artbannersxtd', 'back_button']}),
32 dict(name='span', attrs={'class': ['pathway']}),
33 dict(name='th', attrs={'class': ['pagenav_next', 'pagenav_prev']}),
34 dict(name='table', attrs={'class': ['headlines']}),
35 ]
36
37 feeds = [('Posts', 'http://www.fudzilla.com/?format=feed')]
38
39 preprocess_regexps = [(re.compile(r'<p class="MsoNormal"> Welcome.*</p> ', re.DOTALL | re.IGNORECASE), lambda match: '')]