python - 我使用 selenium 进行网络爬行,获取 url 时出现语法错误,请帮我找到原因

标签 python selenium url syntax-error

我使用 selenium 进行网络爬行,获取 url 时出现语法错误

url = https://www.pwc.co.uk/services/economics-policy/insights/women-in-work-index.html
driver.get(url)

异常

File "<ipython-input-9-49259ef7fb39>", line 1
url = https://www.pwc.co.uk/services/economics-policy/insights/women-in-work-index.html
           ^
SyntaxError: invalid syntax

最佳答案

url 必须是字符串

url = "https://www.pwc.co.uk/services/economics-policy/insights/women-in-work-index.html"

关于python - 我使用 selenium 进行网络爬行,获取 url 时出现语法错误,请帮我找到原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59135952/

相关文章:

python - 如何模拟 do-while 循环?

python - 使用python PIL将图像转换为base64

python - 如何在Python中使用Selenium提取<figure>图像?

java - 如何查询 servlet 容器以从 ServletContextListener 获取有效 URL?

php - 如何设置已发送到邮件的 url,并且该链接应该重定向到 php 中的另一个 url

java - 我应该如何为具有 LDAP 和两个 LDAP 服务器的 Oracle 编写 JDBC url?

python - 字典中 4 个和 3 个元素的组合

python - 从 Tumblr Api 获取视频 url

python - 如何隐藏 Chromedriver 控制台窗口?

Java Selenium 读取 Java 脚本弹出值