可获得对方的留言板数据,且不会留下访问痕迹。返回数据为json格式,留言内容在['data']['commentList'],还包含一些其他信息,可自行选择获取。
url:
https://user.qzone.qq.com/proxy/domain/m.qzone.qq.com/cgi-bin/new/get_msgb
请求方式: get
url参数:
{
'uin': [自己QQ号],
'hostUin': [对方QQ号],
'start': '0', # [请求的页码]
'format': 'json',
'num': '10', # [每页的数量最大为20]
'inCharset': 'utf-8',
'outCharset': 'utf-8',
'g_tk':[网页端登录自己的qq空间获取]
}
headers
{
user-agent:[自行获取],
cookies:[QQ空间获取,只需P_skey,p_uin,skey,uin]
}
返回数据示例
{code: 0, subcode: 0, message: "", default: 0,…} );
code: 0
data: {total: 1886, authorInfo: {,…}, commentList: [,…]}
authorInfo: {,…}
commentList: [,…]
0: {id: "1000050382", secret: 1, pasterid: "", bmp: " 8c58d800202e201", pubtime: "2018-07-19 14:09:18",…}
bmp: " 8c58d800202e201"
effect: 4194304
id: "1000050382"
modifytime: 0
pasterid: ""
pubtime: "2018-07-19 14:09:18"
secret: 1
type: 0
total: 1886
default: 0
message: ""
subcode: 0
python请求示例
r = requests.get(url, params=payload, headers=hd).json()
网友评论