Domestic security browser 360, 360 fast browser, QQ browser, surf browser or a new version is not yet listed on the Edge browser Chrome browser is based on open source development version Chronium come. So 360 browser can be understood as a custom Chrome browser, the latest 360 security browser is based on Chromium 63 release, behind the official version of Chrome.
We download the corresponding version 2.35 chromedriver driver to download Address: https://npm.taobao.org/mirrors/chromedriver/
Under chromedriver.exe after downloading codecs can be placed in the same directory or a script to configure the environment variable path, such as under the Python Scripts. However, in order to avoid conflicts and chromedriver our official version of Chrome, we can also put down any path, designated chromedriver manual used in the script location. Use way (assuming we chromedriver.exe version 2.35 on the D drive):
driver = webdriver.Chrome(r'D:\chromedriver.exe') # 或 driver = webdriver.Chrome(executable_path=r'D:\chromedriver.exe')
Before the quotation marks r
indicate raw, as is a string, to avoid \ c transfers and other special characters.
But this is the system default startup start Chrome the default browser in the path, we can use to specify options when you start the browser by binary_loaction
specifying the location of the browser, use the following method
options = webdriver.ChromeOptions()
options.binary_location = r'C:\Users\Secoo\AppData\Roaming\360se6\Application\360se.exe'
driver = webdriver.Chrome(r'D:\chromedriver.exe', options=options)
Complete code:
from selenium import webdriver
from time import sleep
options = webdriver.ChromeOptions()
options.binary_location = r'C:\Users\Secoo\AppData\Roaming\360se6\Application\360se.exe'
driver = webdriver.Chrome(r'D:\chromedriver.exe', options=options)
driver.get('https://www.baidu.com')
sleep(3)
driver.quit()
Run shot:
Note: 360 secure browser default is to maximize the start, and Chrome different elements of the same operation and Chrome.
QQ browser travel browser, cheetah browser, or the same Chromium browser, download the corresponding version of the driver, specify the drive path and the path to the browser is running.