From 342db2df38d68c98c53296d0f6638814d270ab27 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Tue, 26 Jan 2021 22:00:20 +0100 Subject: [PATCH] Add comments --- functions/football.py | 3 +++ functions/scraping.py | 1 + 2 files changed, 4 insertions(+) diff --git a/functions/football.py b/functions/football.py index a0538fa..e7f2456 100644 --- a/functions/football.py +++ b/functions/football.py @@ -143,6 +143,7 @@ def getTable(): if rows is None: return "Er ging iets fout. Probeer het later opnieuw." + # Format every row to work for Tabulate formatted = [_formatRow(row) for row in rows] header = "Jupiler Pro League Klassement" @@ -156,6 +157,8 @@ def _formatRow(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")])[:6] + # Insert the team name into the list scoresArray.insert(1, row.find_all("a")[0].renderContents().decode("utf-8").split("