This project has moved. For the latest updates, please go here.

Xpath to select attributes ending with .flv

Oct 22, 2009 at 7:31 AM

Hi Guys,

im trying to use hap to parse out embed flash movies on webpages and then view the movie on my computer full screen instead of the webpages dimensions.  So far i have this code


WebClient w = new WebClient();
            string html = w.DownloadString("");

            HtmlDocument doc = new HtmlDocument();

            HtmlNodeCollection nodes = doc.DocumentNode.SelectNodes("//embed[@flashvars]");
            foreach (HtmlNode node in nodes)

however because theres another flash advertisement it will list 2 node for the embed tag.  Is there any xpath that can select only src attributes ending with a .flv?


Oct 22, 2009 at 7:33 AM

oops small correction the foreach loop should have 





Oct 22, 2009 at 1:02 PM

Can't you just but an If statement in there where?

  //Do Magic