using System.Collections.Generic;
public static void Main()
string data=Program.Get_HTML("http://www.usnews.com/education/best-global-universities/europe");
int startindex=data.IndexOf("h-taut");
int newstartindex= startindex + 116;
int endindex=data.IndexOf("</a>",newstartindex);
String CollegeName=data.Substring(newstartindex,endindex-newstartindex).Trim();
Console.WriteLine(CollegeName);
int firstlinkstartindex=newstartindex-86;
int endlinkindex=data.IndexOf(">",firstlinkstartindex);
String firstlink=data.Substring(firstlinkstartindex,endlinkindex-firstlinkstartindex).Replace("\""," ").Replace("arab-region","best-global");
Console.WriteLine(firstlink);
String kingsaudinfo=Program.Get_HTML(firstlink);
int secondstartindex=newstartindex+CollegeName.Length + 812;
int secondendindex=data.IndexOf("</a>",secondstartindex);
string seconddata=data.Substring(secondstartindex,secondendindex-secondstartindex);
Console.WriteLine(seconddata);
int thirdstartindex=secondstartindex + seconddata.Length + 831;
int thirdendindex=data.IndexOf("</a>",thirdstartindex);
string thirddata=data.Substring(thirdstartindex,thirdendindex-thirdstartindex).Replace("amp;","");
Console.WriteLine(thirddata);
int fourthstartindex=thirdstartindex + thirddata.Length + 831 + 792;
int fourthendindex=data.IndexOf("</a>",fourthstartindex);
string fourthdata=data.Substring(fourthstartindex,fourthendindex-fourthstartindex);
Console.WriteLine(fourthdata);
public static string Get_HTML(string Url)
System.Net.WebResponse Result = null;
System.Net.WebRequest req = System.Net.WebRequest.Create(Url);
Result = req.GetResponse();
System.IO.Stream RStream = Result.GetResponseStream();
System.IO.StreamReader sr = new System.IO.StreamReader(RStream);
new System.IO.StreamReader(RStream);
Page_Source_Code = sr.ReadToEnd();
if (Result != null) Result.Close();