From ee47445d99c7db10a53b62fd278cd25e53c42be5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Jun 2013 08:35:02 +0530 Subject: [PATCH] Update The Walrus Mag Fixes #1193021 [Update recipe The Walrus Mag](https://bugs.launchpad.net/calibre/+bug/1193021) --- recipes/walrusmag.recipe | 47 ++++++---------------------------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/recipes/walrusmag.recipe b/recipes/walrusmag.recipe index 5c10100fe4..72b110b046 100644 --- a/recipes/walrusmag.recipe +++ b/recipes/walrusmag.recipe @@ -1,46 +1,13 @@ from calibre.web.feeds.news import BasicNewsRecipe -class AdvancedUserRecipe1282101454(BasicNewsRecipe): - title = 'The Walrus Mag' +class AdvancedUserRecipe1371743239(BasicNewsRecipe): + title = u'The Walrus Mag' + description = 'National general interest magazine about Canada and its place in the world' language = 'en' - __author__ = 'TonytheBookworm' - description = 'national general interest magazine about Canada and its place in the world' - publisher = 'Tony Stegall' - category = 'Canada, news' - oldest_article = 365 + __author__ = 'Bert' + oldest_article = 34 max_articles_per_feed = 100 + auto_cleanup = True - masthead_url = 'http://www.walrusmagazine.com/images/wordmark.png' - keep_only_tags = [ - dict(name='h1'), - dict(name='div', attrs={'id':['prbody']}) - # ,dict(attrs={'id':['cxArticleText','cxArticleBodyText']}) - ] - feeds = [ - ('Walrus Magazine', 'http://feeds.feedburner.com/WalrusFeatureArticles?format=xml'), - - ] - - - - - def print_version(self, url): - split1 = url.split("/articles/") - #print 'THE SPLIT IS: ', split1 - url1 = split1[0] - #print 'url1 is: ',url1 - url2 = split1[1] - #print 'url2 is: ',url2 - - - #need to convert to print_version - #originalversion is : http://www.walrusmagazine.com/articles/2010.09-frontier-no-one-can-hear-you-scream/ - #printversion should be: http://www.walrusmagazine.com/print/2010.09-frontier-no-one-can-hear-you-scream/ - - - - - print_url = url1 + '/print/' + url2 - #print 'THIS URL WILL PRINT: ', print_url # this is a test string to see what the url is it will return - return print_url + feeds = [(u'The Walrus Mag', u'http://thewalrus.ca/feed/')]