【发布时间】:2021-04-20 11:32:40
【问题描述】:
https://etherscan.io/address/0xCcE984c41630878b91E20c416dA3F308855E87E2
我想刮掉 Token 标签旁边的 lisbox href。
我需要从
抓取 hrefclass="link-hover d-flex justify-content-between align-items-center"
所以我的代码:
import requests
from bs4 import BeautifulSoup
page = requests.get('https://etherscan.io/address/0xCcE984c41630878b91E20c416dA3F308855E87E2').text
html = BeautifulSoup(page, 'html.parser')
href = html.find(class_ = 'link-hover d-flex justify-content-between align-items-center')['href']
但是结果什么都没有。谁能帮我? 我真的需要一些帮助。
【问题讨论】:
标签: python beautifulsoup python-requests