The cookie in python is different from that in header.

is when passing cookie
headers= {"cookies":self.cookies,"user-agent": * *}
res=request.get (url=url,headers=headers)

this is the first way to write

there is another
cookie_str=cookies
headers= {"user-agent": * *}
cookies=dict (cookies)
res=request.get (url=url,headers=headers,cookies=cookie_str)

this is the second way to write. What"s the difference between the two?
print (res.text)

Jan.20,2022

No matter how the form changes to the end, it will be sent in the form of a http message.
cookie will be converted to the cookie attribute in header


it doesn't feel different. It should be the two ways of writing get
. The cookie_str, of the second way seems to be useless

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40a7e-2c524.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40a7e-2c524.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?