本帖最后由 Zeaf 于 2020-7-14 01:48 编辑
只要模拟登录对了,获取就不会错
参考https://www.52pojie.cn/forum.php?mod=viewthread&tid=1217367&ctid=2090
我用的是requests的session获取cookie
[Python] 纯文本查看 复制代码 r = requests.session()
res = r.post(url,headers=user,data=data)#模拟访问
cookie=str(r.cookies.get_dict())
获取到的cookie
[Asm] 纯文本查看 复制代码 {'PHPSESSID': 'gg3btoe69ac355keu6b00s0p83'}
我通过F12分析获得的cookie大概是这样:
[Asm] 纯文本查看 复制代码 UM_distinctid = 17348a4b56aef - 03944f33b1688f - 313f68 - 144000 - 17348a4b56b9a7;
PHPSESSID = 0;
UM_distinctid = 0;
uerrNum = 0;
uerrExpire = 0;
schoolExt = 50;
schoolType = 1;
schoolName = xxxxxx;
CNZZDATA1264405206 = 0 % 7C1594648887;
CNZZDATA1255523150 = 0 % 7C1594651037;
type = 1;
ulauth = a9c79fed4ee87c04d6b87f37dc9435ee;
uvauth = 2ebb49e1005ac2089abdc71665b1de52;
uin = 1;
uuid = xxxxx;
utid = 1;
name = xxxxx;
uniName = xxxxxx;
sid = JyItZD9v;
healAjax = 1
不知道有没有大佬能帮忙看看为什么会不一样 |