2024-09-27 02:25:19 发布
网友
我尝试使用以下代码将adblock添加到selenium中:
chop =webdriver.ChromeOptions() chop.add_extension('Adblock-Plus_v1.4.1.crx') driver = webdriver.Chrome(chrome_options=chop)
我有个错误:
我该怎么办?在
您需要提供完整路径:
from os import path chop =webdriver.ChromeOptions() chop.add_extension(path.abspath('Adblock-Plus_v1.4.1.crx')) driver = webdriver.Chrome(chrome_options=chop)
您需要提供完整路径:
相关问题 更多 >
编程相关推荐