From a5f13fa593080c8e5a63b4cc4bdbffb1dfd968be Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 29 Jan 2010 18:25:41 -0700 Subject: [PATCH] Workaround for broken XHTML in some Washington Post articles --- resources/recipes/wash_post.recipe | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/recipes/wash_post.recipe b/resources/recipes/wash_post.recipe index 5e62aa753c..a917371cec 100644 --- a/resources/recipes/wash_post.recipe +++ b/resources/recipes/wash_post.recipe @@ -46,3 +46,10 @@ class WashingtonPost(BasicNewsRecipe): div['style'] = '' return soup + def preprocess_html(self, soup): + for tag in soup.findAll('font'): + if tag.has_key('size'): + if tag['size'] == '+2': + if tag.b: + return soup + return None