我在 ropsten testnetwork 上的 etherscan api 有问题,代码的输出是:期望值 line 1 column 1 (char 0)
编码:
import requests, json
ADD = "0xfbb61B8b98a59FbC4bD79C23212AddbEFaEB289f"
KEY = "HERE THE API KEY"
REQ = requests.get(f"https://api-ropsten.etherscan.io/api?module=account&action=balance&address={str(ADD)}&tag=latest&apikey={str(KEY)}")
CONTENT = json.loads(REQ.content)
BALANCE = int(CONTENT['result'])
print(BALANCE)
编辑:我进一步研究了它,当我尝试发出请求时,它会返回 <Response [403]>