From a9451dd8b059dacf57a2746587cc1f19bbb8f57d Mon Sep 17 00:00:00 2001 From: bobbysteel Date: Mon, 11 Dec 2017 12:52:59 +0000 Subject: [PATCH 1/2] 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': { From 1e57ff1657f69ce468207670be8e112fafcfef71 Mon Sep 17 00:00:00 2001 From: bobbysteel Date: Mon, 11 Dec 2017 13:14:44 +0000 Subject: [PATCH 2/2] Update times_online.recipe --- recipes/times_online.recipe | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/recipes/times_online.recipe b/recipes/times_online.recipe index 73daa8601e..1839036fe5 100644 --- a/recipes/times_online.recipe +++ b/recipes/times_online.recipe @@ -89,13 +89,10 @@ class TimesOnline(BasicNewsRecipe): 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', 'Comments Article-container', - 'ArticlePager', 'Media-caption']}}, - }] + {'attrs': {'class': lambda x: x and 'Topics' in x}}, + {'name': ['object', 'link', 'iframe', 'base', 'meta', 'script']}, + {'attrs': { 'class': ['u-hide', 'RelatedLinks', 'Comments Article-container','ArticlePager','Media-caption']}}] + remove_attributes = ['lang'] keep_only_tags = [{ 'attrs': {