python获取chrome cookies
https://github.com/n8henrie/pycookiecheat
from pycookiecheat import chrome_cookies
import requests
url = 'http://example.com/fake.html'
# 默认情况下使用Chrome的默认cookie文件路径
cookies = chrome_cookies(url)
r = requests.get(url, cookies=cookies)
# 使用cookie_file关键字参数为cookie文件指定不同的文件路径:chrome_cookies(url,cookie_file='/abspath/to/cookies')
# 请记住,pycookiechait默认为查找Chromium的cookie,而不是Google Chrome,因此如果您使用后者,则需要手动指定“/home/username/.config/Google-Chrome/Default/cookies”作为cookie_file。
标签:cookies,python,chrome,cookie,url,file,Chrome
From: https://www.cnblogs.com/zhangdingqu/p/16754232.html