how to get all my desired links from a html page
if suppose im having youtube homepage(www.youtube.com) which contains numerous links, i want to get all the link of youtube videos alone and it must be stored in a array.. it contains around 10 videos i want 10 videos link in array.. how can i do it???

Jaganathan BantheswaranPosted Oct 26, 2013, 9:22 AM
if(urlValue.Contains("youtube.com"))
{
//Code goes here
}
Prasanth RPosted Oct 26, 2013, 3:15 AM
Jaganathan BantheswaranPosted Oct 25, 2013, 7:52 AM
Prasanth RPosted Oct 25, 2013, 5:21 AM
Jaganathan BantheswaranPosted Oct 25, 2013, 4:44 AM
Try like this,
WebClient client = new WebClient();
string downloadString = client.DownloadString("http://www.youtube.com");
string strRegex = @"(?i)]+)>(.+?)";
RegexOptions myRegexOptions = RegexOptions.IgnoreCase | RegexOptions.Multiline;
Regex myRegex = new Regex(strRegex, myRegexOptions);
foreach (Match myMatch in myRegex.Matches(downloadString))
{
if (myMatch.Success)
{
// Add your code here
}
}