views:

64

answers:

1

Hi,

I've had a search and come up with Rhino and Jaxer is possible solutions, but wanted to put the queston out there anyway as I'm not sure they're quite what I'm after (especially if I have no control over the javascript, so I'm unable to add runat="server" for example).

So, I want to call a remote page on a 3rd party site, from my server, and have the javascript executed.

Using CUrL, I can easily grab the page, it's content, do POSTing etc, etc, but what I can't do, is run javascript.

I've had solutions suggested from building a .NET application which calls the URLs in a browser, to the above (Rhino and Jaxer) but I wanted to see if anyone had any previous experience of this and if so, what are the possible gotchas and how did you solve the problem.

Cheers,

Mike

A: 

I think Jaxer is your only option. You can use Jaxer.Sandbox to render remote page on the server and execute all scripts embedded on that page. The resulting DOM is what you'd get in Firefox web browser with JS enabled. Here's a simple tutorial featuring Jaxer.Sandbox for web scrapping purposes.

pawel