|
楼主 |
发表于 2015-4-1 21:56:08
|
显示全部楼层
DotNet4.Utilities.HttpHelper httpHelper = new DotNet4.Utilities.HttpHelper();
DotNet4.Utilities.HttpItem httpItem = new DotNet4.Utilities.HttpItem();
httpItem.URL = "https://steamcommunity.com/market/buylisting/425929146580637275";
httpItem.Referer = "http://steamcommunity.com/market/listings/570/Bright%20Moon%20Mokdori";
httpItem.Accept = "*/*";
httpItem.Method = "POST";
httpItem.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
httpItem.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 BIDUBrowser/6.x Safari/537.36";
CookieCollection objcok = new CookieCollection();
objcok.Add(new Cookie("Steam_Language", "english"));
objcok.Add(new Cookie("765_6workshopQueueTime", "1427696221"));
objcok.Add(new Cookie("strInventoryLastContext", "570_2"));
objcok.Add(new Cookie("timezoneOffset", "28800%2C1"));
objcok.Add(new Cookie("__utma", "268881843.752842853.1426557236.1427786478.1427791762.23"));
objcok.Add(new Cookie("__utmz", "268881843.1427791762.23.21.utmcsr=store.steampowered.com|utmccn=(referral)|utmcmd=referral|utmcct=/"));
objcok.Add(new Cookie("sessionid", "xxxxxxxxxxxxxxxxxxxxx"));
objcok.Add(new Cookie("steamCountry", "CN%7C674d420bea9fa0d59241481e88605223"));
objcok.Add(new Cookie("steamLogin", "76561198092536937%7C%7C1A53DDB6C094E8D38B8F49E8E54543E61BB8AFBD"));
httpItem.CookieCollection = objcok;
DotNet4.Utilities.HttpResult httpResult = httpHelper.GetHtml(httpItem);
string result = httpResult.Html;
<HTML><HEAD>
<TITLE>Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reference #7.965732b8.1427896475.bdae0e37
</BODY>
</HTML>
|
|