diff --git a/blitzutils.py b/blitzutils.py index 73eab93..39bd482 100755 --- a/blitzutils.py +++ b/blitzutils.py @@ -1960,6 +1960,17 @@ class WoTinspector: return replay_links + @classmethod + def read_replay_id(cls, json_replay): + """Read replay_id from replay JSON file""" + try: + url = json_replay['data']['view_url'] + return cls.get_replay_id(url) + except Exception as err: + error(exception=err) + return None + + @classmethod def get_replay_id(cls, url): return url.rsplit('/', 1)[-1]