抓包得到的response有多行Set-CookieHTTP/1.1302FOUNDDate:Tue,31Jul201804:30:15GMTContent-Type:text/html;charset=utf-8Transfer-Encoding:chunkedVary:CookieX-Frame-Options:SAM...
抓包得到的response有多行Set-Cookie
HTTP/1.1 302 FOUND
Date: Tue, 31 Jul 2018 04:30:15 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Vary: Cookie
X-Frame-Options: SAMEORIGIN
Set-Cookie: login_csrftoken=nHH6GZZhPUERRnCbRSJYiu6brNur7bwc; expires=Tue, 30-Jul-2019 04:31:56 GMT; Max-Age=31449600; Path=/
Set-Cookie: sessionid=5uig24g0cue6ugivahgyt5zi5ymdxwtx; expires=Tue, 14-Aug-2018 04:31:56 GMT; httponly; Max-Age=1209600; Path=/
Set-Cookie: b_token=KNGEf6qIs5t2qiOX_X3_lnFMcfJDo3GDFNDHO_DLRO4; Domain=.sh.ctinm.com; Path=/
Connection: keep-alive
用requests得到的response只有一个Set-Cookie是怎么回事
{'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'Set-Cookie': 'bklogin_csrftoken=nHH6GZZhPUERRnCbRSJYiu6brNur7bwc; expires=Tue, 30-Jul-2019 04:31:57 GMT; Max-Age=31449600; Path=/', 'Vary': 'Accept-Encoding, Cookie', 'Connection': 'keep-alive', 'Date': 'Tue, 31 Jul 2018 04:30:15 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Type': 'text/html; charset=utf-8'}
原来是发生了302跳转,cookie发生变化,禁用跳转就可以了
展开