【发布时间】:2022-11-14 02:00:31
【问题描述】:
我通常不使用 Python 中的 BeautifulSoup,所以我很难在网页中找到与 Ibex 35 匹配的值 8.133,00:https://es.investing.com/indices/indices-futures 到目前为止,我正在获取页面的所有信息,但我无法过滤以获取该值:
site = 'https://es.investing.com/indices/indices-futures'
hardware = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101
Firefox/106.0'}
request = Request(site,headers=hardware)
page = urlopen(request)
soup = BeautifulSoup(page, 'html.parser')
print(soup)
我很感激能得到那个价值的手。 问候
【问题讨论】:
-
invest.com 似乎正在使用一种反抓取算法。
-
是的,它有。所以我放弃它。谢谢
-
不要轻易放弃,伙计...
标签: python beautifulsoup