无法获取信息,因为第三方浏览器插件正在阻止J

2024-04-25 20:44:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我想从https://www.similarweb.com/中提取数据,但当我运行代码时,它显示(将HTML的输出转换为文本):

Pardon Our Interruption http://cdn.distilnetworks.com/css/distil.css" media="all" /> http://cdn.distilnetworks.com/images/anomaly-detected.png" alt="0" />

Pardon Our Interruption...

As you were browsing www.similarweb.com something about your browser made us think you were a bot. There are a few reasons this might happen:

You're a power user moving through this website with super-human speed.

You've disabled JavaScript in your web browser.

A third-party browser plugin, such as Ghostery or NoScript, is preventing JavaScript from running. Additional information is available in this support article .

After completing the CAPTCHA below, you will immediately regain access to www.similarweb.com.

if (!RecaptchaOptions){ var RecaptchaOptions = { theme : 'blackglass' }; } 

You reached this page when attempting to access https://www.similarweb.com/ from 14.139.82.6 on 2017-05-22 12:02:37 UTC.

Trace: 9d8ae335-8bf6-4218-968d-eadddd0276d6 via 536302e7-b583-4c1f-b4f6-9d7c4c20aed2 

我写了以下代码:

^{pr2}$

有人能帮我怎样提取信息吗?在


Tags: 代码httpsbrowsercomyouhttpwwwour
1条回答
网友
1楼 · 发布于 2024-04-25 20:44:33

我用requests试过了,但失败了。selenium似乎有效。在

>>> from selenium import webdriver
>>> driver = webdriver.Chrome()
>>> driver.get('https://www.similarweb.com/')

相关问题 更多 >