mirror of https://github.com/MISP/misp-modules
Merge branch 'master' of github.com:MISP/misp-modules into chrisr3d_patch
commit
651f69126d
|
@ -24,10 +24,14 @@ start_time = 0
|
||||||
conversion_rates = {}
|
conversion_rates = {}
|
||||||
|
|
||||||
def get_consumption(output=False):
|
def get_consumption(output=False):
|
||||||
req = requests.get(converter_rls)
|
try:
|
||||||
jreq = req.json()
|
req = requests.get(converter_rls)
|
||||||
minute = str(jreq['Minute']['CallsLeft']['Histo'])
|
jreq = req.json()
|
||||||
hour = str(jreq['Hour']['CallsLeft']['Histo'])
|
minute = str(jreq['Data']['calls_left']['minute'])
|
||||||
|
hour = str(jreq['Data']['calls_left']['hour'])
|
||||||
|
except:
|
||||||
|
minute = str(-1)
|
||||||
|
hour = str(-1)
|
||||||
# Debug out for the console
|
# Debug out for the console
|
||||||
print("Calls left this minute / hour: " + minute + " / " + hour)
|
print("Calls left this minute / hour: " + minute + " / " + hour)
|
||||||
return minute, hour
|
return minute, hour
|
||||||
|
|
Loading…
Reference in New Issue