import os import json req = os.popen('curl -H "Authorization: Bearer USRllWyuqyO3KZpKNxKPAuQsMPoMS2qg5o" "https://us.api.blizzard.com/data/wow/search/item?namespace=static-us&name.en_US=Thunderfury&orderby=id&_page=1&access_token=USRllWyuqyO3KZpKNxKPAuQsMPoMS2qg5o"').read() parse = json.loads(req) print(json.dumps(parse, indent=2))
<pre>Traceback (most recent call last): File "c:\Users\squid\OneDrive\Documents\programming\wowheadapitest.py", line 4, in <module> req = os.popen('curl -H "Authorization: Bearer [secret]" "https://us.api.blizzard.com/data/wow/search/item?namespace=static-us&name.en_US=Thunderfury&orderby=id&_page=1&access_token=[secret]"').read() File "C:\Users\squid\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 307: character maps to <undefined>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)