summaryrefslogtreecommitdiff
path: root/jfr_playoff/data/match/jfrhtml.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-12-30 21:08:45 +0100
committeremkael <emkael@tlen.pl>2019-12-30 21:08:45 +0100
commit8230739ccf52970a61c68f414f0cf2812b79f766 (patch)
tree80bfc95746817447f3824b9f376e8157371778e8 /jfr_playoff/data/match/jfrhtml.py
parent885b6773ef59613594f45fa3941797e053931a15 (diff)
Match links fetched via result info client mechanism
Diffstat (limited to 'jfr_playoff/data/match/jfrhtml.py')
-rw-r--r--jfr_playoff/data/match/jfrhtml.py20
1 files changed, 20 insertions, 0 deletions
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']