【发布时间】:2020-03-13 15:24:13
【问题描述】:
我使用谷歌浏览器创建了一个 Microsoft Form 调查,我将链接发送给不同的个人以完成调查,现在我想查看已完成调查的个人的所有回复。如何使用 python 直接从 chrome 下载 Microsoft Form excel 表?
代码:
import selenium
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("Microsoft Form Link")
button = driver.find_element_by_id('Open in Excel')
button.click()
但我得到了这个错误:
WebDriverException: Message: 'chrome driver' executable needs to be in PATH. Please see
https://sites.google.com/a/chromium.org/chromedriver/home
【问题讨论】:
-
您可以访问您的 azure 租约吗?如果是这样,请尝试并利用 Microsoft Graph API - 此外,您似乎还没有下载 chrome 驱动程序并将其添加到您的路径
driver = webdriver.Chrome(path_to_driver) -
您的错误不是关于下载 excel 表,而是关于让 selenium 完全正常工作。在我看来,你应该问一个新的问题
标签: python python-3.x selenium-webdriver