import requests
cookie_url = 'https://xui.ptlogin2.qq.com/cgi-bin/xlogin?s_url=https%3A%2F%2Fgraph.qq.com%2Foauth2.0%2Flogin_jump'
"""
appid: 716027609
daid: 383
style: 33
theme: 2
login_text: 授权并登录
hide_title_bar: 1
hide_border: 1
target: self
s_url: https://graph.qq.com/oauth2.0/login_jump
pt_3rd_aid: 310187341
pt_feedback_link: https://support.qq.com/products/77942?customInfo=www.52pojie.cn.appid310187341
"""
pt_local_token = requests.get(cookie_url, headers={'pragma':'no-cache'}).cookies.get_dict()['pt_local_token']
info_url = 'https://localhost.ptlogin2.qq.com:4301/pt_get_uins?callback=ptui_getuins_CB&pt_local_tk=' + pt_local_token
# 这一步没走通, 使用浏览器插件发起请求可以获取数据, 使用postman或者代理抓包重发, 获取不到
print(requests.get(info_url, headers={'Referer':'https://xui.ptlogin2.qq.com/', 'Cookie':'pt_local_token='+pt_local_token}, verify=False).text)