diff --git a/resources/images/news/walrusmag.png b/resources/images/news/walrusmag.png new file mode 100644 index 0000000000..17030d94b8 Binary files /dev/null and b/resources/images/news/walrusmag.png differ diff --git a/resources/recipes/walrusmag.recipe b/resources/recipes/walrusmag.recipe new file mode 100644 index 0000000000..5c10100fe4 --- /dev/null +++ b/resources/recipes/walrusmag.recipe @@ -0,0 +1,46 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1282101454(BasicNewsRecipe): + title = 'The Walrus Mag' + 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 + max_articles_per_feed = 100 + + 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 +