Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MISP/misp-modules into chrisr3d_p…
Browse files Browse the repository at this point in the history
…atch
  • Loading branch information
chrisr3d committed Nov 13, 2018
2 parents 4149a07 + 3e25428 commit 651f691
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions misp_modules/modules/expansion/btc_steroids.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
conversion_rates = {}

def get_consumption(output=False):
req = requests.get(converter_rls)
jreq = req.json()
minute = str(jreq['Minute']['CallsLeft']['Histo'])
hour = str(jreq['Hour']['CallsLeft']['Histo'])
try:
req = requests.get(converter_rls)
jreq = req.json()
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
print("Calls left this minute / hour: " + minute + " / " + hour)
return minute, hour
Expand Down

0 comments on commit 651f691

Please sign in to comment.