谷歌浏览器:
google_path=r'--user-data-dir=C:UsersjdmAppDataLocalGoogleChromeUser Data'
option=webdriver.ChromeOptions()
option.add_argument(google_path)
driver=webdriver.Chrome(chrome_options=option)
火狐浏览器:
firefox_path=r'C:UsersjdmAppDataRoamingMozillaFirefoxProfiles7elc1ibd.default'
profile=webdriver.FirefoxProfile(firefox_path)
driver=webdriver.Firefox(profile)