I want to connect to the etherscan Ropsten test-net with python:
URL = 'https://api-ropsten.etherscan.io/api?module=contract&action=getsourcecode&address=0x1c7f98370206b4d44bfbb011c65bc582fcdae4fe&apikey='+ API_key s = requests.Session() response = s.get(URL)
The response code is always Forbidden 403. I tested with curl the same url and it works. I tried to use py-etherscan-api, but there are no examples how to connect to Ropsten.