【发布时间】: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