printInfo("开始截取[已买到的宝贝]页面数据。。。");
HttpPost httpost2 = new HttpPost("http://buyertrade.taobao.com/trade/itemlist/asyncBought.htm?action=itemlist/QueryAction&event_submit_do_query=1&_input_charset=utf8");
// All the parameters post to the web site
List nvps2 = new ArrayList();
nvps2.add(new BasicNameValuePair("pageNum", "1"));
nvps2.add(new BasicNameValuePair("pageSize", "15"));
nvps2.add(new BasicNameValuePair("prePageNo", "0"));
// nvps2.add(new BasicNameValuePair("queryOrder", "desc"));
try {
httpost2.setEntity(new UrlEncodedFormEntity(nvps2));
httpost2.setHeader("cookie", tmpcookies);
httpost2.setHeader("Referer", "http://trade.taobao.com/trade/itemlist/list_bought_items.htm");
//httpost2.addHeader(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded");
response = httpclient.execute(httpost2);
System.out.println(EntityUtils.toString(response.getEntity()));
} catch (Exception e) {
printError("登录失败");
e.printStackTrace();
} finally {
httpost2.abort();
}
printInfo("完成截取[已买到的宝贝]页面数据");
return "";
获取个人淘宝历史订单,只能获取到前15条