diff --git a/recipes/wash_post.recipe b/recipes/wash_post.recipe index 6460104be8..73d869a905 100644 --- a/recipes/wash_post.recipe +++ b/recipes/wash_post.recipe @@ -1,3 +1,5 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 __license__ = 'GPL v3' __copyright__ = '2011, Darko Miletic ' ''' @@ -28,6 +30,20 @@ class TheWashingtonPost(BasicNewsRecipe): publication_type = 'newspaper' remove_attributes = ['style', 'width', 'height'] + recipe_specific_options = { + 'days': { + 'short': 'Oldest article to download from this news source. In days ', + 'long': 'For example, 0.5, gives you articles from the past 12 hours', + 'default': str(oldest_article) + } + } + + def __init__(self, *args, **kwargs): + BasicNewsRecipe.__init__(self, *args, **kwargs) + d = self.recipe_specific_options.get('days') + if d and isinstance(d, str): + self.oldest_article = float(d) + extra_css = ''' .img { text-align:center; font-size:small; } .auth { font-weight:bold; font-size:small; }