小编Wil*_*tal的帖子

在chromedriver中禁用PDF Viewer插件

我正在尝试批量下载BlackBoard环境中的大量文件(在世界各地的大学/学校中使用很多).我能够检索文件所在的链接但是一个市长问题:

当文件是.pdf文件时,它将显示在新的浏览器选项卡中,而不是下载.对于例如.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   
Run Code Online (Sandbox Code Playgroud)

python selenium python-2.7 selenium-chromedriver

1
推荐指数
1
解决办法
5065
查看次数