在Firefox浏览器中使用Selenium with Python将PDF文件下载到特定目录时,pdf文件没有被下载到该目录中,而是在firefox浏览器本身中打开。需要帮助。不能使用Firefox_Profile,就不再推荐它了。from selenium import webdriver
from selenium.webdriver.firefox
例如,我正在使用requests获取网页。"><span class="icon pdf">pdf</span> Early years inspection report </a></td>
<td class="date‘):断开其他:打印’最新报告‘”PDF未找到’中断打印‘“最新报告”PDF点“,链接‘’href‘p=requests.get(o
profile.setPreference("browser.helperApps.neverAsk.openFile", "application/pdf");("pdfjs.disabled", true); // disable the built-in PDF viewer
// Set Firefox profile to capabilitiesoptions.setCapability(Firefox