From 0a7be539f120d34dad229e7232be4144f438611b Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:47:11 +0530 Subject: [PATCH] Update financial_times.recipe --- recipes/financial_times.recipe | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/financial_times.recipe b/recipes/financial_times.recipe index a4c6dfc507..20e68683e0 100644 --- a/recipes/financial_times.recipe +++ b/recipes/financial_times.recipe @@ -146,6 +146,10 @@ class ft(BasicNewsRecipe): return html def preprocess_html(self, soup): + for table in soup.findAll('table'): + if len(table.find('tbody').findAll('tr')) > 20: + table.find('tbody').decompose() + table.string = '** a table that was supposed to be here has been removed.' for con in soup.findAll(attrs={'class':'n-content-layout__slot'}): if con.find('figure'): con['id'] = 'fig'