From f98d9bb01bc99689dabbf412b61e5e7d4deba55c Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 31 May 2019 00:33:07 +0200 Subject: Table cleanup fixes (probably the order of matched elements from CSS selector in html.parser changed) --- http/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'http') diff --git a/http/index.py b/http/index.py index 4699207..cc21bfe 100644 --- a/http/index.py +++ b/http/index.py @@ -106,9 +106,9 @@ def handler(req): garbage.extract() # unnecessary tables removed - page_content.select('table > tr > td')[1].extract() - for table in page_content.select('table > tr > td > table')[2:4]: + for table in page_content.select('table > tr > td > table')[4:]: table.extract() + page_content.select('table > tr > td')[-1].extract() # internal link targets (team, WK breakdown, etc.) removed for internal_link in page_content.select('table > tr > td > table a'): -- cgit v1.2.3