#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' ''' theatlantic.com ''' import re from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag, NavigableString class TheAtlantic(BasicNewsRecipe): title = 'The Atlantic' __author__ = 'Kovid Goyal and Sujata Raman' description = 'Current affairs and politics focussed on the US' INDEX = 'http://www.theatlantic.com/magazine/toc/0/' language = 'en' keep_only_tags = [{'attrs':{'class':['article', 'articleHead', 'articleText']}}] remove_tags = [dict(attrs={'class':'footer'})] no_stylesheets = True preprocess_regexps = [ (re.compile(r'', re.DOTALL), lambda m: ''), (re.compile(r'.*