【发布时间】:2021-12-29 09:32:02
【问题描述】:
获取 etherscan 交易块 id 的代码
def block_chain_explorer_block_id(url):
import requests
from bs4 import BeautifulSoup
r = requests.get(url)
soup = BeautifulSoup(r.content, 'html5lib')
tags = soup.findAll('div', attrs = {'class':'col-md-9'})
print(soup.findAll('a'))
block_chain_explorer_block_id(https://etherscan.io/tx/0x4529e9f79139edab871a699df455e57101cca90574e435da89db457df4885c54)
输出获取:
[<a href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" rel="noopener noreferrer" target="_blank">Cloudflare</a>]
我的输出高于polygonscan 工作正常。 etherscan 工作正常。
知道如何让它工作吗?
【问题讨论】:
-
它是刮,刮,刮 - 废料是完全不同的东西
-
我也遇到了问题,你有什么问题吗?
标签: python beautifulsoup python-requests etherscan