holy fuck

This commit is contained in:
Victor Fors 2022-04-06 01:13:27 +02:00
parent a549aadd5f
commit e733e5cd0a

View File

@ -3,7 +3,10 @@ import requests
import sys
import textwrap
import pprint
import simplejson
try:
from simplejson.errors import JSONDecodeError
except ImportError:
from json.decoder import JSONDecodeError
api = 'http://api.steampowered.com/'
key = '63578AF8E85EDF1E49411D5D4E18E166'
@ -20,7 +23,7 @@ def json_query(url, transform, params={}):
sys.exit(1)
try:
data = result.json()
except simplejson.errors.JSONDecodeError as err:
except JSONDecodeError as err:
print('Error when decoding JSON:\nFrom endpoint ' + url + ':\n' + str(err) + '\n' + str(result) + '\n')
sys.exit(1)
try: