[Javascript] 爬蟲 模擬新浪微博登陸
阿新 • • 發佈:2019-02-18
1 agent('http://login.sina.com.cn/sso/login.php?client=ssologin.js(v1.4.11)',
2 {type: 'POST', headers: { Referer : 'http://weibo.com/?from=bp&lang=zh-cn'},
3 data : {
4 entry:'weibo',
5 :1,
6 from:'',
7 savestate:7,
8 useticket:1,
9 pagerefer:'http://weibo.com/a/download',
10 vsnf:1,
11 su:'MTgxMDU0MjMzNyU0MHFxLmNvbQ==',
12 service:'miniblog',
13 time: servertime,
14 nonce: nonce,
15 pwencode:'rsa2',
16 rsakv: rsakv,
17 sp: sp,
18 encoding:'UTF-8',
19 prelt:505,
20 url:'http://weibo.com/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack',
21 returntype:'META'
22 }
23 }, function(err, data){ ... });
2 {type: 'POST', headers: { Referer : 'http://weibo.com/?from=bp&lang=zh-cn'},
3 data : {
4 entry:'weibo',
5 :1,
6 from:'',
7
8 useticket:1,
9 pagerefer:'http://weibo.com/a/download',
10 vsnf:1,
11 su:'MTgxMDU0MjMzNyU0MHFxLmNvbQ==',
12 service:'miniblog',
13
14 nonce: nonce,
15 pwencode:'rsa2',
16 rsakv: rsakv,
17 sp: sp,
18 encoding:'UTF-8',
19 prelt:505,
20
21 returntype:'META'
22 }
23 }, function(err, data){ ... });