How to get cookies from web-browser with Python?

后端 未结 1 1366
不思量自难忘°
不思量自难忘° 2020-12-03 07:33

Context:
I am working on a backend access to an OpenID consumer (StackExchange in fact). If I am to provide all possible OpenID providers as an opti

相关标签:
1条回答
  • 2020-12-03 08:17

    I created a module to do exactly that, available here: https://bitbucket.org/richardpenman/browsercookie/

    Example usage:

    import requests
    import browsercookie
    cj = browsercookie.chrome()
    r = requests.get('http://stackoverflow.com', cookies=cj)
    

    python3 fork: https://github.com/borisbabic/browser_cookie3

    0 讨论(0)
提交回复
热议问题