Webscrapping地址

问题描述 投票:0回答:1

我正在尝试使用python在Web上抓取etherscan站点的特定部分,因为没有此功能的api。基本上转到this link,然后需要按验证,然后弹出一个弹出窗口,您可以看到here。我需要抓取的是这部分0x0882477e7895bdc5cea7cb1552ed914ab157fe56,以防消息以图片中的消息开头。

我已经编写了下面的python脚本来开始执行此操作,但是我不知道如何与该站点进行进一步的交互,以便使该弹出窗口成为前台并抓取信息。这可能吗?

from bs4 import BeautifulSoup
from requests import get

headers = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0','X-Requested-With': 'XMLHttpRequest',}
url = "https://etherscan.io/proxyContractChecker?a=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
response = get(url,headers=headers )
soup = BeautifulSoup(response.content,'html.parser')

谢谢

python web-scraping beautifulsoup code-contracts etherscan
1个回答
0
投票

你不能用漂亮的汤来做。使用硒。

© www.soinside.com 2019 - 2024. All rights reserved.