From 129a6fb723791a74a5498ab96245888c72e06233 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Aug 2010 15:41:31 -0600 Subject: [PATCH] SNopes by STarson17. Fixes #6410 (New Recipe: Snopes) --- resources/recipes/snopes.recipe | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 resources/recipes/snopes.recipe diff --git a/resources/recipes/snopes.recipe b/resources/recipes/snopes.recipe new file mode 100644 index 0000000000..bfea0425d2 --- /dev/null +++ b/resources/recipes/snopes.recipe @@ -0,0 +1,46 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Starson17' +''' +snopes.com +''' +from calibre.web.feeds.recipes import BasicNewsRecipe + +class Snopes(BasicNewsRecipe): + title = 'Snopes' + __author__ = 'Starson17' + description = 'Urban Legends' + oldest_article = 21 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'utf8' + publisher = 'Snopes' + category = 'news, ' + language = 'en' + publication_type = 'newsportal' + remove_javascript = True + no_stylesheets = True + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + ,'linearize_tables': True + } + + keep_only_tags = [ + dict(name='h1'), + dict(name='div', attrs={'class':['article_text']}), + ] + + feeds = [ + ('Snopes', 'http://www.snopes.com/info/whatsnew.xml'), + ] + + extra_css = ''' + h1{font-family:Trebuchet MS,Bookman Old Style,Arial;color:#75b570} + h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:medium;} + p{font-family:Arial,Helvetica,sans-serif;font-size:small;} + body{font-family:Arial,Helvetica,sans-serif;font-size:small;} + '''