mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-21 02:07:06 +02:00
WoTinspector.read_replay_id(): added back
This commit is contained in:
1 parent
e48759ce79
commit
bca474218e
1 file changed
+11
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user