I am trying to pull transactions for a list of addresses:
wallet_addresses = ['0x7abe0ce388281d2acf297cb089caef3819b13448', '0xC098B2a3Aa256D2140208C3de6543aAEf5cd3A94',
'0x2FAF487A4414Fe77e2327F0bf4AE2a264a776AD2']
for address in wallet_addresses:
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)' 'Chrome/80.0.3987.149 Safari/537.36'}
url = f'https://etherscan.io/address/{address}#tokentxns'
response = requests.get(url,headers=headers)
result = response.json()
print(result)
However, the above gives the following error:
JSONDecodeError: Expecting value: line 2 column 1 (char 1)
How can I get the contents of the page for each address?
EDIT: What I am hoping for is a json of the table contents on the page to convert to a DataFrame.