【发布时间】:2017-06-12 03:24:58
【问题描述】:
我正在尝试在 BlackBoard 环境中批量下载大量文件(在世界各地的大学/学校中经常使用)。我能够检索文件所在的链接,但只有一个市长问题:
当文件是 .pdf 文件时,它会显示在新的浏览器选项卡中,而不是被下载。例如使用 click() 下载 .xlsx 文件效果很好..
我可以更改驱动程序设置以更改此行为吗?怎么做?
编辑
我根据 Ari 的回答更新了问题。它现在包含有关实际插件的更多信息。也许这可用于识别必须禁用的插件..
Chrome PDF Viewer (2 files)
Name: Chrome PDF Viewer
Version:
Location: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/
Type: BROWSER PLUGIN
Disable
MIME types: MIME type Description File extensions
application/pdf .pdf
Name: Chrome PDF Viewer
Description: Portable Document Format
Version:
Location: internal-pdf-viewer
Type: PPAPI (out-of-process)
Disable
MIME types: MIME type Description File extensions
application/x-google-chrome-pdf Portable Document Format
.pdf
【问题讨论】:
标签: python python-2.7 selenium selenium-chromedriver