0

This is the cookie:

{'secure': False, 'domain': '.dashnet.org', 'httpOnly': True, 'path': '/', 'name': '__cfduid', 'expiry': None, 'value': 'd0c8a701ccb379dc7ac094575c111d6051487290749'}

When trying to add it to Firefox using the Selenium module for Python, i got the following error:

Traceback (most recent call last):
  File "<pyshell#34>", line 1, in <module>
    browser.add_cookie(cookies[0])
  File "C:\Program Files\Python35\lib\site-packages\selenium-3.0.2-py3.5.egg\selenium\webdriver\remote\webdriver.py", line 671, in add_cookie
    self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict})
  File "C:\Program Files\Python35\lib\site-packages\selenium-3.0.2-py3.5.egg\selenium\webdriver\remote\webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "C:\Program Files\Python35\lib\site-packages\selenium-3.0.2-py3.5.egg\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: InvalidCookieDomainError is not defined

So, what is the problem with this cookie?

jophab
  • 5,356
  • 14
  • 41
  • 60
José
  • 153
  • 5
  • That looks like a bug in the selenium code because `InvalidCookieDomainError` is not defined but I am not familiar enough to be sure. However, that error should still give you a clue of where to look. Make sure the domain is correct. – FamousJameous Feb 17 '17 at 16:33

1 Answers1

0

Quote from https://stackoverflow.com/a/30676300/2158288:

"The cookie domain should not have a leading dot, as in .foo.com - simply use foo.com"

Maybe that's the problem.

Community
  • 1
  • 1
Gyrotank
  • 153
  • 1
  • 2
  • 9