2024-04-26 11:00:21 发布
网友
如何使用selenium和python避免这个问题
{不要求下载}应设置}
from selenium import webdriver profile = webdriver.FirefoxProfile() profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'application/octet-stream') profile.set_preference("browser.safebrowsing.enabled", 'false') driver = webdriver.Firefox(profile) driver.get("http://yourpage.com")
"application/octet-stream"是文件类型,如果不知道文件类型,请选中MIME types
"application/octet-stream"
使用chrome,您应该能够使用:
另请查看this answer以获取更多信息
{不要求下载}应设置}
"application/octet-stream"
是文件类型,如果不知道文件类型,请选中MIME types使用chrome,您应该能够使用:
^{pr2}$另请查看this answer以获取更多信息
相关问题 更多 >
编程相关推荐