I am attempting to connect to the Ethereum blockchain and monitor transactions as they are broadcasted. I don't have the capability to run a full node on my computer, so I am relying on "third party" nodes to connect to the blockchain. The two that I have been trying are "https://mainnet.infura.io/ [MY PRIVATE KEY]" and "https://api.myetherapi.com/eth". To retrieve newest transactions I am using the web3 python module filters. However, when I execute this code, as inspired by here and here:
from web3 import Web3, HTTPProvider
import time
node = #DEPENDS
connection = Web3(HTTPProvider(node))
block_filter = connection.eth.filter('latest')
time.sleep(60) #OR LONGER
print(block_filter.get_all_entries())
If my node is the infuria one, I get the error "requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: https://mainnet.infura.io/ [MY PRIVATE KEY]". If I use the myetherapi one, the result is simply an empty list.
Are there any other HTTP nodes that I could use to connect to the blockchain? Or is the problem with my code?