Friday 15 June 2012

.net - How can i login to website using Crawling In C# -



.net - How can i login to website using Crawling In C# -

i have unusual task , wish find help here.

i working on crawling windows form application have textbox (search) , search button allow me info linkedin search engine, , below code:

private void linkedinsearch(string _person) { httpwebrequest httpreq = (httpwebrequest)webrequest.create("https://www.linkedin.com/vsearch/p?keywords="+_person); httpwebresponse httpres = (httpwebresponse)httpreq.getresponse(); streamreader sr = new streamreader(httpres.getresponsestream()); string responsetext = sr.readtoend(); regex mainregex = new regex("<li class=" + '"' + "mod result idx0 people" + '"' + ">.*?</li>"); matchcollection matchs = mainregex.matches(responsetext); foreach (match m in matchs) { messagebox.show(m.value); } }

i used in code httpwebrequest send request , httpwebresponse response , applied regex extract specific info linkedin, code run should first login linkedin , login should done without apis should done using http request , response can 1 help in doing this?

the exact problem how can login linkedin using windows form application can extract info linkedin search engine?

i think fiddler of import in case.

actually, according user agreement linkedin, not permitted crawl website or scrape data.

notable sections:

8.2. don'ts. agree not: utilize manual or automated software, devices, scripts robots, other means or processes access, “scrape,” “crawl” or “spider” services or related info or information; scrape or re-create profiles , info of others through means (including crawlers, browser plugins , add-ons, , other technology or manual work);

c# .net regex web-scraping web-crawler

No comments:

Post a Comment