Debian Codegraph @

recipes/skeptic.recipe

raw
1 import re
2
3 from calibre.web.feeds.news import BasicNewsRecipe
4
5
6 class Skeptic(BasicNewsRecipe):
7 title = 'The Skeptic'
8 description = 'Discussions with leading experts and investigation of fringe science and paranormal claims.'
9 language = 'en'
10 __author__ = 'Starson17'
11 oldest_article = 31
12 cover_url = 'http://www.skeptricks.com/images/Skeptic_Magazine.jpg'
13 remove_empty_feeds = True
14 remove_javascript = True
15 max_articles_per_feed = 50
16 no_stylesheets = True
17
18 remove_tags = [
19 dict(name='div', attrs={'class': ['Introduction', 'divider']}),
20 dict(name='div', attrs={'id': ['feature', 'podcast']}),
21 dict(name='div', attrs={'id': re.compile(r'follow.*', re.DOTALL | re.IGNORECASE)}),
22 dict(name='hr'),
23 ]
24
25 feeds = [('The Skeptic', 'http://feeds.feedburner.com/Skepticcom'), ('E-Skeptic', 'http://www.skeptic.com/eskeptic')]
26
27 def get_browser(self):
28 br = BasicNewsRecipe.get_browser(self)
29 br.addheaders = [('Accept', 'text/html')]
30 return br
31
32 extra_css = '''
33 h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
34 h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
35 p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
36 body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
37 '''