[C#] 纯文本查看 复制代码
public string delBaoBei(string cookie1, string token)
{
string sUrl = "https://sell.taobao.com/auction/merchandise/auction_list.htm?type=11";
item = new HttpItem()
{
URL = sUrl,
Method = "POST", //URL 可选项 默认为Get
Timeout = 100000, //连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000, //写入Post数据超时时间 可选项默认为30000
IsToLower = false, //得到的HTML代码是否转成小写 可选项默认转小写
Cookie = cookie1, //字符串Cookie 可选项
UserAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)",//用户的浏览器类型,版本,操作系统 可选项有默认值
Accept = "text/html, application/xhtml+xml, */*",// 可选项有默认值
ContentType = "application/x-www-form-urlencoded", //返回类型 可选项有默认值
Referer = "", //来源URL 可选项
ResultType = ResultType.String,
// Postdata = "_tb_token_=<token>&pageName=goodsOnSale&banner=&page=1&setVal=1&orderField=1&orderBy=0&singleId=&singleIdNum=&singleIdMinNum=&distributionIds=&action=goodsmanager/GoodsManageAction&event_submit_do_recommend=&event_submit_do_delete=1&event_submit_do_off_shelf=&event_submit_do_unrecommend=&event_submit_do_set_lighting_auction=&shopCatName=aaa&_tb_token_=<token>&searchKeyword=&startPrice=&endPrice=&recommend=&outId=&startNum=&endNum=&category=&scatid=&operate=&selectedIds=521434590313&canoff:521434590313=true&recommend:521434590313=false&operate=&pageNO=".Replace("<token>", token)
Postdata = "pageName=goodsOnSale&banner=&page=1&setVal=1&orderField=1&orderBy=0&singleId=&singleIdNum=&singleIdMinNum=&distributionIds=&action=goodsmanager/GoodsManageAction&event_submit_do_recommend=&event_submit_do_delete=1&event_submit_do_off_shelf=&event_submit_do_unrecommend=&event_submit_do_set_lighting_auction=&shopCatName=aaa&searchKeyword=&startPrice=&endPrice=&recommend=&outId=&startNum=&endNum=&category=&scatid=&operate=&selectedIds=521434590313&canoff:521434590313=true&recommend:521434590313=false&operate=&pageNO=".Replace("<token>", token)
};
HttpResult result = http.GetHtml(item);
string html = result.Html; //返回源码
return html;
}