阿里的答案几乎可以正常工作。我只需要将插件的名称封装到一个列表中:
chromeOptions = webdriver.ChromeOptions()prefs = {"plugins.plugins_disabled" : ["Chrome PDF Viewer"]} # Here should be a listchromeOptions.add_experimental_option("prefs",prefs)chromedriver = "path/to/chromedriver.exe"driver = webdriver.Chrome(executable_path=chromedriver, chrome_options=chromeOptions)现在下载工作正常!



