Using Chrome's cookies in Python-Requests

前端 未结 2 1794
温柔的废话
温柔的废话 2021-02-19 00:36

I\'m trying to log in to the http://www.steampowered.com website using the cookies I\'ve got from my Chrome session.

Once I\'ve grabbed all the cookie tabl

2条回答
  •  青春惊慌失措
    2021-02-19 01:18

    I created a module to load cookies from Firefox.

    Example usage with requests:

    import requests
    import browser_cookie
    cj = browser_cookie.firefox()
    r = requests.get(url, cookies=cj)
    

提交回复
热议问题