read_replay_id(): read _id from replay JSON

This commit is contained in:
Jylpah committed 2020-11-26 21:28:29 +02:00
1 parent 19c0e3857e
commit fe7292a588
1 file changed
+10
+10
View File
@@ -1747,6 +1747,16 @@ class WoTinspector:
return url.rsplit('/', 1)[-1]
@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 chk_JSON_replay(cls, json_resp):
""""Check String for being a valid JSON file"""