Hey all i am trying to find the param for a shockwave video within the web page source. The source looks like this:
<object align="middle" width="480" height="320" viewastext="" id="player" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="sameDomain" name="allowScriptAccess">
<param value="http://mediawebsite.com/lcmplayer.swf?autoStart=1&hidecontrols=1&&noresize=1&file=http%3A%2F%2Ftx02.us.mediawebsite.com%2Fedge2%2F31dfty452611%26sec%3D1090" name="movie">
<param value="best" name="quality">
<param value="#000000" name="bgcolor">
<param value="true" name="allowFullScreen">
<param value="" name="FlashVars">
<embed align="middle" width="480" height="320" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="sameDomain" name="player" bgcolor="#000000" flashvars="" quality="best" src="http://mediawebsite.com/lcmplayer.swf?autoStart=1&hidecontrols=1&&noresize=1&file=http%3A%2F%2Ftx02.us.mediawebsite.com%2Fedge2%2F31dfty452611%26sec%3D1090">
</object>
I’m just needing to get this from the above:
or whatever it could be within the < param value=”http://xxxxxxxxx HTML code. Oh course that HTML code link could change every refresh so thats why i need to just get whats inside the param.
I am using HtmlAgilityPack as stated in the title and VB.net 2008.
This is my current code i am using to load the HTML and parse it:
Imports HtmlAgilityPack
Imports System.Text.RegularExpressions
Private Sub getVidLink()
Dim doc As New HtmlDocument()
'doc.LoadHtml("<html><body><p><table id=""foo""><tr><th>hello</th></tr><tr><td>world</td></tr></table></body></html>")
doc.Load("C:\kathryn\fpHTML.html")
For Each table As HtmlNode In doc.DocumentNode.SelectNodes("//object")
Debug.Print("Found: " + table.Id)
For Each row As HtmlNode In table.SelectNodes("param")
Debug.Print(row.Id)
Next
Next
End Sub
But its not finding any values for the param. They are all blank?…
Any help would be great!
David
should give you what you need