📜  python 请求获取 cookie - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:19.343000             🧑  作者: 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
]