From a9451dd8b059dacf57a2746587cc1f19bbb8f57d Mon Sep 17 00:00:00 2001 From: bobbysteel Date: Mon, 11 Dec 2017 12:52:59 +0000 Subject: [PATCH] Remove suggested link cloud --- recipes/times_online.recipe | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/times_online.recipe b/recipes/times_online.recipe index 373770c956..73daa8601e 100644 --- a/recipes/times_online.recipe +++ b/recipes/times_online.recipe @@ -86,15 +86,16 @@ class TimesOnline(BasicNewsRecipe): br.open('https://login.thetimes.co.uk/', data) return br - remove_tags = [{ + remove_tags = [ + {'attrs': {'class': lambda x: x and 'Toolbar' in x}}, + {'attrs': {'class': lambda x: x and 'Tooltip' in x}}, + {'attrs': {'class': lambda x: x and 'Topics' in x}}, { 'name': ['object', 'link', 'iframe', 'base', 'meta', 'script']}, { 'attrs': { 'class': [ - 'tools comments-parent', 'u-hide', 'RelatedLinks', 'Tooltip', - 'Toolbar Toolbar--bottom', 'Comments Article-container', - 'ArticlePager', 'Media-caption']}}, { - 'attrs': { - 'class': lambda x: x and 'Toolbar' in x}}] + 'tools comments-parent', 'u-hide', 'RelatedLinks', 'Comments Article-container', + 'ArticlePager', 'Media-caption']}}, + }] remove_attributes = ['lang'] keep_only_tags = [{ 'attrs': {