I'm trying to get acquainted with python's web3 class, and I cannot seem to get connected to infura's node using my API. The isConnected() function always returns false, no matter what.
from web3 import Web3, eth
infura_url = 'https://mainnet.infura.io/v3/' + my_api_key
w3 = Web3(HTTPProvider(infura_url))
print (w3.isConnected())
Always returns false. And if I can't connect to the ethereum network, I can't run fucntions on contracts etc. It's a problem :(