Parsing out a hidden field inside iframe using HtmlAgilityPack .NET
I'm having problems picking out data I need that's inside an iframe form. Is it even possible using Html开发者_运维百科AgilityPack? Here's a screenshot using Firebug so it's easier for you guys to see.
http://i.stack.imgur.com/ftt84.jpg
I need to parse out the post_form_id. I've tried
var value = doc.DocumentNode.SelectSingleNode("//input[@type='hidden' and @name='post_form_id']")
.Attributes["value"].Value;
but obviously won't work because it's inside the iframe form. Appreciate any help.
I would
- Use the HTMLAglityPack to find the iframe location
- Use the System.URI class find the absolute link of the iframe page
- Open this iframe page
- Use HTMLAglityPack again on the iframe page to find the required information
精彩评论