![]() Opera_profile = r'C:\\Users\\dan\\AppData\\Roaming\\Opera Software\\Opera Stable' Simple way to know the profile path of Opera is just typeĪbout://about in address bar and check for the Profile line under None of which are my IP and the VPN icon is showing next to the address bar. Options.add_argument('user-data-dir=' + opera_profile)ĭriver = webdriver.Opera(options=options) Opera_profile = '/home/dan/.config/opera' # The profile where I enabled the VPN previously using the GUI. "enable VPN from the GUI and the setting got saved in the active Options: this takes an instance of ChromeOptions You are trying to use OperaOptions not ChromeOptions, from Python version is 3.6.7 and Opera version is. If it is of any concern I use Ubuntu 16.04, and OperaDriver is downloaded from the official github page. I tried to do this in python and nothing worked out. OperaOptions.addArguments("user-data-dir", "~/Library/Application Support/") The code posted in the link is OperaOptions operaOptions = new OperaOptions() The OP says that he was able to make it work by using OperaOptions to load a custom profile. The closest I got was this feature request on github. There seems to be absolutely no documentation or any other questions related to this anywhere. I have searched almost all questions on OperaDriver on SO as well as on other sites. But my script opens up the browser to display my real IP address. When I go to this site on the opera browser with VPN enabled, my IP is masked and some other IP address is shown. from selenium import webdriverįrom import Optionsĭriver = webdriver.Opera(executable_path=r'/path/to/operadriver') I have this script that goes to a website to display my IP address. My question is can the VPN be turned on while using OperaDriver with selenium in python? ![]() The opera browser has a built-in VPN which allows you to hide your IP while browsing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |