python使用requests获取cookies的值
这里以获取雪球的xq_a_token为例
import requests
r = requests.get("https://xueqiu.com", headers={"user-agent":"Mozilla"})
print(r.cookies["xq_a_token"])
import requests
r = requests.get("https://xueqiu.com", headers={"user-agent":"Mozilla"})
print(r.cookies["xq_a_token"])