I'm an IT student and we need to develop a C# program that gets all the information from a website and then use NoSQL to add the information to an Oracle database. I've got a few questions and would really appreciate some help.
We decided to use the Autotrader (http://www.autotrader.co.za/) website and MongoDB for NoSQL.
So far I'm using the following code to write information from the website to a text file, but the problem is that it only gets information from the current page, and not the entire website.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
StreamReader sr = new StreamReader(resp.GetResponseStream());
string sourceCode = sr.ReadToEnd();
sr.Close();
resp.Close();
return sourceCode;
I would like to know how I can follow all the links and get all the information from the website (not just the current page), without going to any other websites.
Secondly, after I have all information from the website, how should I go about retrieving specific information for the Oracle database with MongoDB etc.