Debian Codegraph @

recipes/the_verge.recipe

raw
1 #!/usr/bin/env python
2 # vim:fileencoding=utf-8
3 from calibre.web.feeds.news import BasicNewsRecipe
4
5
6 class HindustanTimes(BasicNewsRecipe):
7 title = 'The Verge'
8 language = 'en'
9 __author__ = 'Krittika Goyal'
10 oldest_article = 1 # days
11 max_articles_per_feed = 25
12 use_embedded_content = False
13
14 no_stylesheets = True
15 auto_cleanup = True
16 auto_cleanup_keep = '//div[@class="story-image shadowbox entry-content-asset"]'
17
18 recipe_specific_options = {
19 'days': {
20 'short': 'Oldest article to download from this news source. In days ',
21 'long': 'For example, 0.5, gives you articles from the past 12 hours',
22 'default': str(oldest_article),
23 }
24 }
25
26 def __init__(self, *args, **kwargs):
27 BasicNewsRecipe.__init__(self, *args, **kwargs)
28 d = self.recipe_specific_options.get('days')
29 if d and isinstance(d, str):
30 self.oldest_article = float(d)
31
32 feeds = [
33 ('News', 'http://www.theverge.com/rss/index.xml'),
34 ]