From 8230739ccf52970a61c68f414f0cf2812b79f766 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 30 Dec 2019 21:08:45 +0100 Subject: Match links fetched via result info client mechanism --- jfr_playoff/data/match/jfrhtml.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 jfr_playoff/data/match/jfrhtml.py (limited to 'jfr_playoff/data/match/jfrhtml.py') diff --git a/jfr_playoff/data/match/jfrhtml.py b/jfr_playoff/data/match/jfrhtml.py new file mode 100644 index 0000000..40f1395 --- /dev/null +++ b/jfr_playoff/data/match/jfrhtml.py @@ -0,0 +1,20 @@ +from jfr_playoff.data.match import MatchInfoClient +from jfr_playoff.logger import PlayoffLogger + + +class JFRHtmlMatchInfo(MatchInfoClient): + @property + def priority(self): + return 30 + + def is_capable(self): + return ('link' in self.settings) and ('#' not in self.settings['link']) + + def get_exceptions(self, method): + return (TypeError, IndexError, KeyError, IOError, ValueError) + + def get_match_link(self): + PlayoffLogger.get('match.jfrhtml').info( + 'match #%d link pre-defined: %s', + self.settings['id'], self.settings['link']) + return self.settings['link'] -- cgit v1.2.3