diff --git a/resources/recipes/aprospect.recipe b/resources/recipes/aprospect.recipe new file mode 100755 index 0000000000..ce230c624a --- /dev/null +++ b/resources/recipes/aprospect.recipe @@ -0,0 +1,26 @@ +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class AmericanProspect(BasicNewsRecipe): + title = u'American Prospect' + __author__ = u'Michael Heinz' + oldest_article = 30 + language = 'en' + max_articles_per_feed = 100 + recursions = 0 + no_stylesheets = True + remove_javascript = True + + preprocess_regexps = [ + (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: '
'), + (re.compile(r'
.*', re.DOTALL|re.IGNORECASE), lambda match: ''), + (re.compile('\r'),lambda match: ''), + (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: ''), + (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: ''), + (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: ''), + (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: ''), + (re.compile(r'', re.DOTALL|re.IGNORECASE), lambda match: ''), + ] + + feeds = [(u'Articles', u'feed://www.prospect.org/articles_rss.jsp')] + diff --git a/resources/recipes/factcheck.recipe b/resources/recipes/factcheck.recipe new file mode 100644 index 0000000000..b25b9c245b --- /dev/null +++ b/resources/recipes/factcheck.recipe @@ -0,0 +1,19 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class FactCheckOrg(BasicNewsRecipe): + title = u'Factcheck' + __author__ = u'Michael Heinz' + language = 'en' + oldest_article = 7 + max_articles_per_feed = 100 + recursion = 0 + + publication_type = 'magazine' + masthead_url = 'http://factcheck.org/wp-content/themes/Streamline/images/headernew.jpg' + cover_url = 'http://factcheck.org/wp-content/themes/Streamline/images/headernew.jpg' + + remove_tags = [ dict({'id':['footer','footerabout','sidebar']}) ] + + + feeds = [(u'Factcheck', u'feed://www.factcheck.org/feed/')] + diff --git a/resources/recipes/politifact.recipe b/resources/recipes/politifact.recipe new file mode 100644 index 0000000000..d06f3a51e0 --- /dev/null +++ b/resources/recipes/politifact.recipe @@ -0,0 +1,30 @@ +from calibre.wb.feeds.news import BasicNewsRecipe + +class PolitiFactCom(BasicNewsRecipe): + title = u'Politifact' + __author__ = u'Michael Heinz' + oldest_article = 21 + max_articles_per_feed = 100 + recursion = 0 + language = 'en' + + no_stylesheets = True + + publication_type = 'magazine' + masthead_url = 'http://static.politifact.com.s3.amazonaws.com/images/politifactdotcom-flag-fff_01.png' + cover_url = 'http://static.politifact.com.s3.amazonaws.com/images/politifactdotcom-flag-fff_01.png' + + remove_tags = [ + dict(name='div', attrs={'class':'pfstoryarchive'}), + dict(name='div', attrs={'class':'pfhead'}), + dict(name='div', attrs={'class':'boxmid'}), + ] + + keep_only_tags = [dict(name='div', attrs={'class':'pfcontentleft'})] + feeds = [ + (u'Articles', u'http://www.politifact.com/feeds/articles/truth-o-meter/'), + (u'Obamameter', u'http://politifact.com/feeds/updates/'), + (u'Statements', u'http://www.politifact.com/feeds/statements/truth-o-meter/') + ] + +