-2

I am familiar with Selenium, Requests, and I have read a little about Mechanize.

But I cannot seem to find a way to store the cookies as a site is accessed manually into a cookie jar, to then be applied.

I have tried:

    >>> url = 'http://fake.net/login/complex/cookies'
    >>> r = requests.get(url)

    >>> print r.cookies
       {'complex': 'cookies'}

But I do not get what I am looking for at all.

PygmyPony
  • 21
  • 4

1 Answers1

0

Here is how I collect the cookies with selenium:

Cookies = driver.get_cookies()

And, this is how I load them when needed:

for cookie in Cookies:
    driver.add_cookie(cookie)
PixelEinstein
  • 1,713
  • 1
  • 8
  • 17