summaryrefslogtreecommitdiff
path: root/jfr_playoff/data/match
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff/data/match')
-rw-r--r--jfr_playoff/data/match/jfrhtml.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/jfr_playoff/data/match/jfrhtml.py b/jfr_playoff/data/match/jfrhtml.py
index b4a8808..a869811 100644
--- a/jfr_playoff/data/match/jfrhtml.py
+++ b/jfr_playoff/data/match/jfrhtml.py
@@ -77,9 +77,11 @@ class JFRHtmlMatchInfo(MatchInfoClient):
carry_over = [0.0, 0.0]
for i in range(0, 2):
scores[i] += carry_over[i]
- team_names = [[text for text in link.contents
- if isinstance(text, unicode)][0].strip(u'\xa0')
- for link in row.select('a[onmouseover]')]
+ team_names = []
+ for link in row.select('a[onmouseover]'):
+ texts = [text for text in link.contents if isinstance(text, unicode)]
+ if texts:
+ team_names.append(texts[0].strip(u'\xa0'))
for i in range(0, 2):
teams[i].name = [team_names[i]]
teams[i].known_teams = 1