View Single Post
Old 01-22-2015, 06:27 PM   #1
ebrandon
Junior Member
ebrandon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2015
Device: Kindle Voyage
Recipe for TheAtlantic.com

Here's a recipe for TheAtlantic.com, an excellent publisher & aggregator of news and editorial about politics, culture, entertainment, tech, etc.

Note that there is a lot more content on TheAtlantic.com than is published in The Atlantic Magazine, and the website is updated constantly unlike the monthly magazine.

Although some articles from The Atlantic Magazine do appear on TheAtlantic.com, the magazine requires a subscription while the content on TheAtlantic.com is free.
Code:
#!/usr/bin/env python
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1421956712(BasicNewsRecipe):
    title          = 'TheAtlantic.com'
    oldest_article = 7
    max_articles_per_feed = 100
    auto_cleanup   = True
    ignore_duplicate_articles = {'title', 'url'} 
    
    def print_version(self, url):
        return url.replace('/archive/', '/print/')

    feeds          = [
        ('Politics', 'http://feeds.feedburner.com/AtlanticPoliticsChannel'),
        ('International', 'http://feeds.feedburner.com/AtlanticInternational'),
        ('National', 'http://feeds.feedburner.com/AtlanticNational'),
        ('Science and Tech', 'http://feeds.feedburner.com/AtlanticScienceAndTechnology'),
        ('Business', 'http://feeds.feedburner.com/AtlanticBusinessChannel'),
        ('Health', 'http://feeds.feedburner.com/AtlanticFood'),
        ('Education', 'http://feeds.feedburner.com/AtlanticEducationChannel'),
        ('Entertainment', 'http://feeds.feedburner.com/AtlanticCulture'),
        ('Sexes', 'http://feeds.feedburner.com/AtlanticSexesChannel'),
        ('The Atlantic', 'http://feeds.feedburner.com/TheAtlantic'),
        ('The Atlatic Wire', 'http://feeds.feedburner.com/TheAtlanticWire'),
    ]

Last edited by kovidgoyal; 01-22-2015 at 10:28 PM.
ebrandon is offline   Reply With Quote