diff --git a/misp_modules/modules/expansion/btc_steroids.py b/misp_modules/modules/expansion/btc_steroids.py index c4edaa32..adce9b68 100755 --- a/misp_modules/modules/expansion/btc_steroids.py +++ b/misp_modules/modules/expansion/btc_steroids.py @@ -24,10 +24,14 @@ start_time = 0 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