Вождение браузера Opera VPN в режиме - PullRequest
0 голосов
/ 23 сентября 2019
import os,time

from selenium import webdriver
from selenium.webdriver.common import desired_capabilities
from selenium.webdriver.opera import options

_operaDriverLoc = os.path.abspath(r'C:/chromewebdriver/operadriver.exe')  # Replace this path with the actual path on your machine.
_operaExeLoc = os.path.abspath(r'C:\Users\YASIN\AppData\Local\Programs\Opera\63.0.3368.71_0\opera.exe')   # Replace this path with the actual path on your machine.

_remoteExecutor = 'http://127.0.0.1:9515'
_operaCaps = desired_capabilities.DesiredCapabilities.OPERA.copy()

_operaOpts = options.ChromeOptions()
_operaOpts._binary_location = _operaExeLoc

# Use the below argument if you want the Opera browser to be in the maximized state when launching.
# The full list of supported arguments can be found on http://peter.sh/experiments/chromium-command-line-switches/
_operaOpts.add_argument(r'--start-maximized  --private  ')

driver = webdriver.Chrome(executable_path = _operaDriverLoc, chrome_options = _operaOpts, desired_capabilities = _operaCaps)

Я управляю браузером Opera по селену с этими кодами, работающими в частном режиме, но vpn выключен, как я могу запустить Opera browser vpn в режиме ON?

...