yqchilde / JDMemberCloseAccount

学习python操作selenium的一个🌰 ,也是一种京东全自动退会方案
MIT License
1.24k stars 346 forks source link

Cookie没法set #140

Closed xxhhlk closed 2 years ago

xxhhlk commented 2 years ago

Traceback (most recent call last): File "C:\Users\im\Music\JDMemberCloseAccount\main.py", line 760, in JDMemberCloseAccount().main() File "C:\Users\im\Music\JDMemberCloseAccount\main.py", line 610, in main self.browser.add_cookie( File "C:\Program Files\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 894, in add_cookie self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict}) File "C:\Program Files\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Program Files\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.UnableToSetCookieException: Message: unable to set cookie (Session info: headless chrome=98.0.4758.80)

chrome版本 98.0.4758.80(正式版本) (64 位),driver也是同一个版本。chrome是新安装的。

xxhhlk commented 2 years ago

好吧,cookie只能有pt_key跟pt_pin,删除其他项后正常了