最近在研究用httphelper抓取手机app上的数据。手机app上的包已经抓到,如下:
[C#] 纯文本查看 复制代码
GET /gw/mskst/1.0/?data=%7B%22ar22%D HTTP/1.1
x-features: 27
x-page-name: comr.SearchDoorActivity
x-location: 13.296554%2C43.272073
user-agent: MTO+5%29
x-ttid: 600sdl.2
cache-control: no-cache
a-orange-q: appKey=7845547&appVersion=8.2&clientAppIndexVersion=1020&clientVersionIndexVersion=1212813
x-appkey: 987
x-region-channel: CN
x-mini-wua: HHdakdjaksdjsjddahqwen3D
x-nq: WIFI
x-c-traceid: WZSKDJSKJD775
content-type: application/x-www-form-urlencoded;charset=UTF-8
x-app-conf-v: 17
x-app-ver: 6.11.2
x-t: 1506604802
x-pv: 5.1
f-refer: mtop
Cookie: v=0; cookie17=VyyZHiaiEtRZ
x-sid: 11982asdrewhhyfgfdg1d645fb463
x-nettype: WIFI
x-utdid: WZaksdjfhdsfsA3L2Zom
x-umt: ZVHVngWnPTSB0PZ5mOrLyIdW0b0bb1YL
x-devid: AuadsadsadOBWQuI
x-sign: ab20380040b7bfe1a9b4596897c1ca9e67023fc06d1e6acc55
x-page-url: http%3A%2F%2Fs.m.baidu.com%2Fh5entry
x-uid: 408104762
Host: guide-acs.m.baidu.com
Accept-Encoding: gzip
Connection: Keep-Alive
C#代码:
[C#] 纯文本查看 复制代码
HttpHelper httproot = new HttpHelper();
HttpItem httpitemroot = new HttpItem
{
URL = "http://gw/mskst/1.0/?data=%7B%22ar22%D",
Accept = "gzip",
Method = "GET",
ContentType = "application/x-www-form-urlencoded;charset=UTF-8",
Host = "guide-acs.m.baidu.com",
UserAgent = "MTO+5%29",
};
HttpResult resultroot = httproot.GetHtml(httpitemroot);
MessageBox.Show(resultroot.Html);
但是运行的时候出错:提示:未能解析次远程名称:‘gw’
请问站长问题出在哪里?麻烦指点一下,谢谢了!
|