From 89a5f50a1d698101b2ee388372bc0b2e378c3daa Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Mon, 18 Oct 2021 18:39:02 +0200 Subject: [PATCH] Fix jpl table formatting --- functions/football.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/football.py b/functions/football.py index ffe2a20..c8df6ff 100644 --- a/functions/football.py +++ b/functions/football.py @@ -169,7 +169,10 @@ def _format_row(row): """ Function that formats a row into a list for Tabulate to use """ - scoresArray = list([td.renderContents().decode("utf-8") for td in row.find_all("td")])[:9] + tds = row.find_all("td") + tds.pop(1) # Relegation icon + tds.pop(1) # Copy of team name + scoresArray = list([td.renderContents().decode("utf-8") for td in tds])[:9] # Insert the team name into the list scoresArray.insert(1, row.find_all("a")[0].renderContents().decode("utf-8").split("