From 4565069f611566d5d5a730e42a1441dd9bfc9ab4 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:29:29 +0530 Subject: [PATCH] Update guardian.recipe --- recipes/guardian.recipe | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/guardian.recipe b/recipes/guardian.recipe index 68795c062a..cf6df01729 100644 --- a/recipes/guardian.recipe +++ b/recipes/guardian.recipe @@ -114,3 +114,9 @@ class Guardian(BasicNewsRecipe): feeds = list(self.parse_section(self.base_url)) feeds += list(self.parse_section('https://www.theguardian.com/uk/sport')) return feeds + + def preprocess_html(self, soup): + for table in soup.findAll('table'): + if len(table.findAll('tr')) > 20: + table.decompose() + return soup