From dfc3ba3443166dcca40afc6f4e57d33ba24ac1c8 Mon Sep 17 00:00:00 2001 From: Patrick McMichael Date: Mon, 14 Jan 2019 20:55:42 +0000 Subject: [PATCH] Fix stdout team scores --- soccer/writers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/soccer/writers.py b/soccer/writers.py index ca76ce9..7d7dcf3 100644 --- a/soccer/writers.py +++ b/soccer/writers.py @@ -78,14 +78,15 @@ def live_scores(self, live_scores, use_12_hour_format): def team_scores(self, team_scores, time, show_datetime, use_12_hour_format): """Prints the teams scores in a pretty format""" - for score in team_scores["fixtures"]: + import ipdb; ipdb.set_trace() + for score in team_scores["matches"]: if score["status"] == "FINISHED": - click.secho("%s\t" % score["date"].split('T')[0], + click.secho("%s\t" % score["utcDate"].split('T')[0], fg=self.colors.TIME, nl=False) self.scores(self.parse_result(score)) elif show_datetime: self.scores(self.parse_result(score), add_new_line=False) - click.secho(' %s' % Stdout.utc_to_local(score["date"], + click.secho(' %s' % Stdout.utc_to_local(score["utcDate"], use_12_hour_format, show_datetime), fg=self.colors.TIME)