March 2019
Beginner
490 pages
12h 40m
English
You can use the requests library to get cookies from the response object. With the cookies property from that object, you can access the cookies list through a request.cookies.RequestsCookieJar object:
>>> response = requests.get('http://www.github.com') >>> print(response.cookies) <<class 'requests.cookies.RequestsCookieJar'>[<Cookie logged_in=no for .github.com/>,<Cookie _gh_sess=N0RTMHpreVk3cUk0N05qbFNpNncyajU3MVNZVWtINmZQVTUrdnlpQ1lnYnZ6WGdXWU1aQ0d2VXJQVk4wcE1IYWd4Nk54RHRrMWdjNXAwL0lOei9JenlPeUJOeEZkcTRTSTlwTWtveEt0ei9XOWlWZGNwTXNzbmd6Tk93ekcrem9XZDduQzdjdjZXWVJEOXpNVUFXOTZRUWRYalZFay9mWDAvc2NlREJSdEREb1hOUC9LR2prYi9ZQ3FoOHlORHY3L0VvN3Z4MXk0WWJyWklyMXZnSGJXQT09LS1lYlkzY1pWRXBnWUlncjRaaUJacGhnPT0%3D--85b693ec8eee1f743fcaa3dc382ee5048cfda6f1 ...Read now
Unlock full access