如何使用python请求获取cookie

2024-10-03 11:12:07 发布

您现在位置:Python中文网/ 问答频道 /正文

s.get('https://test.com',auth=('user','test'))
x=s.cookies
print(x)

这是我的代码,输出是

<RequestsCookieJar[<Cookie __cfduid=asdasd1232fgdb323123 for .testcom/>, <Cookie JSESSIONID=123fdf54fgfa for test.com/gpcs-web-war>]>

现在,我想得到cfduid和JSESSIONID如何从输出中提取


Tags: 代码httpstestcomauthforgetcookie