Здравствуйте. Помогите пожалуйста с кодом. На GitHub нашёл такой код. Запустил, а выдаёт ошибку
import requests
import json
import time
url = "https://api.bittrex.com/api/v1.1/public/getticker?market=USD-BTC"
INTERVAL = 1
prev_price = 0
while True:
j = requests.get(url)
data = json.loads(j.text)
price = data['result']['Ask']
if price!=prev_price:
prev_price = price
print('BTC PRICE: ' + str(price) + ' $')
time.sleep(INTERVAL)
Ошибка
Traceback (most recent call last):
File "C:\Users\maksi\Desktop\vjhghgjk.py", line 15, in
data = json.loads(j.text)
File "C:\Users\maksi\AppData\Local\Programs\Python\Python310-32\lib\json\init.py", line 335, in loads
raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)