【问题标题】:Not able to open website in google colab using selenium webdriver无法使用 selenium webdriver 在 google colab 中打开网站
【发布时间】:2021-08-27 03:03:01
【问题描述】:

我正在尝试使用 selenium 在 google colab 中打开网站,但无法这样做。安装 chrome 驱动和设置路径变量有问题,所以我使用了 Kora 库。我能够成功执行 wd.get('website') 并能够打印 source_code 。请让我知道如何打开网站。下面是我的代码

!pip install kora -q
from kora.selenium import wd
wd.get('https://www.google.com')
wd.page_source

【问题讨论】:

  • 如果你只需要废弃内容,你可以使用bs4
  • 是的,我只需要报废。我厌倦了bs4,但没有得到我想要的。使用 bs4 我试图废弃linkedIn搜索结果链接,但我没有得到如下所示的配置文件的链接和标签。我想可能是因为使用 python 的登录问题 .................................... ..from urllib.request import urlopen from bs4 import BeautifulSoup as soup html = urlopen('linkedin.com/search/results/people/…) bso = soup(html.read()) bso..

标签: python selenium-webdriver google-colaboratory kora


【解决方案1】:

您可以通过显示wd来显示屏幕。

display(wd)

你到底想做什么?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-01-22
    • 1970-01-01
    • 2016-01-09
    • 1970-01-01
    • 2018-05-23
    • 1970-01-01
    • 2018-08-25
    • 2014-10-28
    相关资源
    最近更新 更多