📜  请求从响应中获取 cookie - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:02.689000             🧑  作者: Mango

代码示例2
//Python requests get all cookies:

If you need the path and thedomain for each cookie, which get_dict() is not exposes, you can parse the cookies manually, for instance:

[
    {'name': c.name, 'value': c.value, 'domain': c.domain, 'path': c.path}
    for c in session.cookies
]