如何使用selenium python选择VPN(zenmate)chrome扩展的国家/地区

2024-04-19 18:28:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用selenium自动选择zenmate VPN扩展的国家,但我不知道如何访问它

这是我添加扩展名的代码:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_option = Options()
chrome_option.add_extension("vpn.crx")
driver1 = webdriver.Chrome(executable_path='chromedriver.exe',options=chrome_option)
driver1.get("https://www.google.com/")

Tags: 代码fromimportaddseleniumextension国家vpn