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 ?

Aniruddha Varma
  • 1,453
  • 1
  • 22
  • 32

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
  • 526
  • 3
  • 5