本文介绍了关于httpwebrequest报废的紧急帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助我抓取网站,在asp.net c#中打乱网站,

i我无法获取数据而我正在尝试废弃网站



HttpWebRequest newRequest;



newRequest =(HttpWebRequest)WebRequest.Create(http://flights.makemytrip.com/makemytrip/search/O/O/ E / 1/0/0 / S / V0 / DEL_BOM_14-08-2015?intid = homepage_Widget_Search_New-Delhi_Mumbai);

newRequest.Method = WebRequestMethods.Http.Get;

newRequest.ContentType =text / html; charset = ISO-8859-1; application / json;



newRequest.UserAgent =Mozilla / 5.0(Windows NT 6.1; WOW64; rv:36.0)Gecko / 20100101 Firefox / 36.0;

newRequest.Referer = finalUrlRef;

response =(HttpWebResponse)newRequest.GetResponse();

string readerNewRequest = new StreamReader(response.GetResponseStream())。ReadToEnd();

help me to crawl website ,scarpping website in asp.net c#,
i am unable to get data while i am trying to scrap website

HttpWebRequest newRequest ;

newRequest = (HttpWebRequest)WebRequest.Create("http://flights.makemytrip.com/makemytrip/search/O/O/E/1/0/0/S/V0/DEL_BOM_14-08-2015?intid=homepage_Widget_Search_New-Delhi_Mumbai");
newRequest.Method = WebRequestMethods.Http.Get;
newRequest.ContentType = "text/html;charset=ISO-8859-1;application/json";

newRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0";
newRequest.Referer = finalUrlRef;
response = (HttpWebResponse)newRequest.GetResponse();
string readerNewRequest = new StreamReader(response.GetResponseStream()).ReadToEnd();

推荐答案


这篇关于关于httpwebrequest报废的紧急帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 11:32