selenium加载cookie报错问题:selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain

selenium加载cookie报错问题:selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain[Python基础]

在使用selenium进行自动化登录的过程中已经获取到cookie后,依旧报错:selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain

获取cookie和添加cookie原代码如下:

#获取cookie

dr = webdriver.Chrome("D:softwareProBrowserDriverchromedriver.exe")
dr.maximize_window()
dr.get(url)
c = dr.get_cookie("JSESSIONID")
print(c)
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » selenium加载cookie报错问题:selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain