From 8069522db780f19f7f09e5b7071e14f0ac35337e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Sep 2012 08:59:23 +0530 Subject: [PATCH] Fix Anandtech. Fixes #1026267 (Anandtech feed: epub crashes sony PRS-650) --- recipes/anandtech.recipe | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/recipes/anandtech.recipe b/recipes/anandtech.recipe index ff08c828ac..b9aa4520db 100644 --- a/recipes/anandtech.recipe +++ b/recipes/anandtech.recipe @@ -12,25 +12,26 @@ class anan(BasicNewsRecipe): title = 'Anandtech' description = 'comprehensive Hardware Tests' - __author__ = 'Oliver Niesner' + __author__ = 'Oliver Niesner' # 2012-09-20 AGE: update use_embedded_content = False language = 'en' timefmt = ' [%d %b %Y]' + oldest_article = 7 # 2012-09-20 AGE: update max_articles_per_feed = 40 no_stylesheets = True remove_javascript = True encoding = 'utf-8' - remove_tags=[ - dict(name='a', attrs={'style':'width:110px; margin-top:0px;text-align:center;'}), - dict(name='a', attrs={'style':'width:110px; margin-top:0px; margin-right:20px;text-align:center;'}), - {'attrs':{'class':['article_links', 'header', 'body_right']}}, - {'id':['crumbs']}, - ] + cover_url = 'http://www.anandtech.com/content/images/globals/header_logo.png' # 2012-09-20 AGE: new + masthead_url = 'http://www.anandtech.com/content/images/globals/printheader.png' # 2012-09-20 AGE: update + + remove_tags=[ + dict(name='a', attrs={'class': 'bluebutton noprint'}), + dict(name='img', attrs={'alt': 'header'}), + ] # 2012-09-20 AGE: update + feeds = [ ('Anandtech', 'http://www.anandtech.com/rss/')] def print_version(self,url): - return url.replace('/show/', '/print/') - - + return url.replace('0Cshow0C', '0Cprint0C') # 2012-09-20 AGE: update \ No newline at end of file