相关文章推荐
鬼畜的火柴  ·  opencv边缘检测报错15: ...·  1 年前    · 
傲视众生的领带  ·  Selenium+Python ...·  1 年前    · 
博学的煎饼  ·  Pytorch ...·  1 年前    · 

Selenium在--headless模式下无法下载报告文件

1 人关注

我试图用刮刀从一个网络报告中下载一个excel文件。当navegator显示时,它运行得很好,但当我在无头模式下尝试时,我得到这个错误。

有什么想法可能是错的吗?我正在使用这个选项

opc.headless = True
opc.add_argument("--start-maximized")
opc.add_argument("--window-size=1920x1080")
opc.add_argument("--enable-features=NetworkService,NetworkServiceInProcess")
opc.add_argument("--disable-dev-shm-usage")
opc.add_argument("--disable-gpu")
opc.add_argument("--no-sandbox")
opc.add_argument("--ignore-certificate-errors")
opc.add_argument("--allow-running-insecure-content")
opc.add_argument("--disable-notifications")
opc.add_argument("--disable-blink-features")
opc.add_argument("--disable-blink-features=AutomationControlled")
opc.add_argument('--disable-dev-shm-usage')