Issue
I need to scrape value and TxFee for each transactions in page: https://etherscan.io/txs?p=1
So far, I get all rows but could not figure out how to reach value and TxFee columns. Do you guys have any idea?
url = 'https://etherscan.io/txs?p=1'
req = Request(url, headers={'User-Agent': 'Mozilla/5.0'})
webpage = urlopen(req).read()
soup = BeautifulSoup(webpage, 'html.parser')
rows=soup.findAll('table')[0].findAll('tr')
Solution
rows=soup.findAll('table')[0].findAll('tr')
# First tr is the header, skip that
for row in rows[1:]:
print(row.find_all('td')[7].text) # 8 the column is the fee
Answered By - gipsy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.