Attention, the cookie DV indicated in your question is contained in the request (Request), and not in the answer (Response)!
Some cookies can be generated dynamically. Probably, some code JavaScript
was executed by the browser after the download of the content of the page, which led to the generation of these cookies.
The Python library requests
does not interpret the content of the page, that is, if there is any code JavaScript
in that content, it will not be executed.
An alternative solution is to use the library selenium
, who is capable of enslave a browser (driver) to interpret the content of a given page, see only:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://www.google.com/')
driver.implicitly_wait(3)
cookies = driver.get_cookies()
print(cookies)
driver.close()
Exit:
[
{'name': 'NID', 'value': '204=sJ0qzKNZMg1bjKafu3ogygb9K9pjfRPhlhNZoJbJ_CRHN0ISwwcjgl47xBjcl3YSOyC0szfBI_XLbkvFlLOkUtzfpCqiD-NYHrOuwQFeKjgc18uNrDfZLby2FpWUuN29Shot10tQA7WBpY_TqWGQjejycOSsvl3mdILX3lM6Ydw', 'path': '/', 'domain': '.google.com', 'secure': True, 'httpOnly': True, 'expiry': 1607022048},
{'name': '1P_JAR', 'value': '2020-06-03-19', 'path': '/', 'domain': '.google.com', 'secure': True, 'httpOnly': False, 'expiry': 1593802849}
]
This way actually generates all the content, but to use without the presence of a browser(drive) would not be possible?
– Gladiston leal