删除淘宝出售中的宝贝,用POST的方式 ,无论如何也删除不掉,求助!!!
抓包如下:
POST /auction/merchandise/auction_list.htm?type=11 HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
X-HttpWatch-RID: 75352-10226
Referer: https://sell.taobao.com/auction/merchandise/auction_list.htm
Accept-Language: zh-Hans-CN,zh-Hans;q=0.7,ja;q=0.3
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko/20100101 Firefox/22.0
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: sell.taobao.com
Content-Length: 592
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ab=86; _umdata=5BCC52290EAF5ADF61BCD39391ACBC0D58068DCB6DA56381A270E43248D34F26B7FF9C0DD8E5AB9BDCAC30F05AD7E24F61A90C0C42CE4A07B9CCDCCE9CA43918DC8869BD15A231C6; v=0; cookie2=1c9206d764f5e0a128a03ac318e7e447; _tb_token_=qVc2vVasqho; existShop=MTQ0MDI5NDI5MA%3D%3D; skt=e3a420821a42db27; uc1=cookie14=UoWzWcbbExcjZA%3D%3D&existShop=true&cookie16=U%2BGCWk%2F74Mx5tgzv3dWpnhjPaQ%3D%3D&cym=1&cookie21=VFC%2FuZ9ajCWYgKY6XrEdEA%3D%3D&tag=7&cookie15=UtASsssmOIJ0bQ%3D%3D&pas=0; sg=%E4%BA%8B22; cookie1=AiGaoV0toRW7Kvr%2BXl%2Fjy1nT45SFzt55b5suBYGiAsI%3D; unb=23012992; _l_g_=Ug%3D%3D; _nk_=333%5Cu7684%5Cu6545%5Cu4E8B; cookie17=UUtLeS2e5%2Bo%3D; thw=cn; cna=60siDhqi4RwCAdNkFh68RpGS; isg=1E2F509ED6BDC4CF1DCCA34D613078EA; l=AvHxr4WVUCS83vmUQ7aIMWIRQXOLdGVW; t=bf945a73e18ad22b0cae49e976087f45; uc3=nk2=UNN%2BQ0iFldg%2B&id2=UUtLeS2e5%2Bo%3D&vt3=F8dASM2UfHlmRHhC%2FBY%3D&lg2=Vq8l%2BKCLz3%2F65A%3D%3D; lgc=333%5Cu7684%5Cu6545%5Cu4E8B; tracknick=333%5Cu7684%5Cu6545%5Cu4E8B; mt=np=&ci=53_1; _cc_=VT5L2FSpdA%3D%3D; tg=0; ali_ab=124.128.192.202.1440228501048.5
_tb_token_=qVc2vVasqho&pageName=goodsOnSale&banner=&page=1&setVal=1&orderField=1&orderBy=0&singleId=&singleIdNum=&singleIdMinNum=&distributionIds=&action=goodsmanager%2FGoodsManageAction&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=%C8%AB%B2%BF%B7%D6%C0%E0&_tb_token_=qVc2vVasqho&searchKeyword=&startPrice=&endPrice=&recommend=&outId=&startNum=&endNum=&category=&scatid=&operate=&selectedIds=521434574236&canoff%3A521434574236=true&recommend%3A521434574236=false&operate=&pageNO=
代码如下:
[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;
} |