python爬虫API:QQ空间留言板

python爬虫API:QQ空间留言板

可获得对方的留言板数据,且不会留下访问痕迹。返回数据为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()

如果您喜爱,请不要吝啬您的点赞关注,您的支持是我最大的动力
如有任何疑问,请评论,或私信联系,定会第一时间为您解答
© 版权声明
THE END
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容