mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-24 19:49:52 +02:00
read_replay_id(): read _id from replay JSON
This commit is contained in:
1 parent
19c0e3857e
commit
fe7292a588
1 file changed
+10
@@ -1747,6 +1747,16 @@ class WoTinspector:
|
|||||||
return url.rsplit('/', 1)[-1]
|
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
|
@classmethod
|
||||||
def chk_JSON_replay(cls, json_resp):
|
def chk_JSON_replay(cls, json_resp):
|
||||||
""""Check String for being a valid JSON file"""
|
""""Check String for being a valid JSON file"""
|
||||||
|
|||||||
Reference in new issue
Block a user