0

I'm loading a web page into my WebView, and I can access it's raw HTML as text. The page has several video elements embedded within it, and I want to get their locations as a list of strings so I can download them separately.

How would I go about doing this ?

Arctic Vowel
  • 1,492
  • 1
  • 22
  • 34

1 Answers1

1

You can use HTTP agility pack for parsing

HtmlDocument document = new HtmlDocument();
           document.LoadHtml(rawText);
           var videoSourceNodes = document.DocumentNode.SelectNodes("//video/source");
           foreach(var node in videoSourceNodes)
           {
               var path = node.Attributes["src"].Value;

           }

It's your concern to convert relative path to absolute.

Dima Korn
  • 546
  • 3
  • 5
  • I got the agility pack and it almost works but the `SelectNodes` function doesn't seem to be available for windows store apps. – Arctic Vowel Feb 25 '15 at 06:04