From 34e3b0e81b9725d216011c25cb4d97f4bd8de0b0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Feb 2014 19:06:48 +0530 Subject: [PATCH] ... --- recipes/ap.recipe | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/ap.recipe b/recipes/ap.recipe index d57022716b..9936c37c7e 100644 --- a/recipes/ap.recipe +++ b/recipes/ap.recipe @@ -9,8 +9,14 @@ class AssociatedPress(BasicNewsRecipe): use_embedded_content = False language = 'en' no_stylesheets = True - auto_cleanup = True - auto_cleanup_keep = '//tr[@class="ap-story-td"]' + conversion_options = { + 'linearize_tables' : True + } + keep_only_tags = {'name':'table', 'attrs':{'class':lambda x: x and 'ap-story-table' in x.split()}} + remove_tags = [ + {'class':['ap-mediabox-table']}, + {'name':'img', 'src':lambda x: x and '//analytics.' in x}, + ] def parse_index(self): feeds = []