from web3 import Web3 '''web1=Web3(Web3.WebsocketProvider("wss://bsc-ws-node.nariox.org:443"))''' web1=Web3(Web3.HTTPProvider("https://bsc-dataseed4.ninicoin.io/")) print(f'connected status:{web1.isCo...

在web3.py开发中,经常会遇到节点网络超时。 url = “https://11bsc-dataseed.binance.org/?web3” bsc= Web3(Web3.HTTPProvider(oec)) 那么可以捕捉相关的网络错误异常,并及时更换节点,方法如下: bsc.provider.__setattr__(“endpoint_uri”...