doc has asked for the wisdom of the Perl Monks concerning the following question:
I have a widget that needs to get HTML source code form a variety of websites. LWP:: is fine for getting most Web pages. It does not however get the 'real' HTML source for pages like:
<script>window.location = 'http://somewhere.else'</script>
What I want to do is get the terminal HTML source that represents the page(s) that a real user gets to see finally rendered in their browser once the javascript redirection dust settles as it were.
While parsing javascript like the simple example above is of course easy, there are an infinite number of variations on this and you need a full blown Javascript/DOM engine. Seeing these are already written for the Major Browsers there seems no point in not just hooking them.
For IE there is OLE or SAMIE but this constrains you to use Windows for the OS which is what we are currently doing.
Is there an equivalent for Mozilla so I can run this widget on *nix?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting HTML Source Code where Javascript Redirects Foil LWP
by Corion (Patriarch) on Oct 24, 2003 at 12:44 UTC | |
|
Re: Getting HTML Source Code where Javascript Redirects Foil LWP
by bunnyman (Hermit) on Oct 24, 2003 at 19:51 UTC | |
by perrin (Chancellor) on Oct 24, 2003 at 21:21 UTC | |
by bunnyman (Hermit) on Oct 24, 2003 at 21:35 UTC | |
|
Re: Getting HTML Source Code where Javascript Redirects Foil LWP
by cbraga (Pilgrim) on Oct 24, 2003 at 17:39 UTC | |
|
Re: Getting HTML Source Code where Javascript Redirects Foil LWP
by Willard B. Trophy (Hermit) on Oct 24, 2003 at 18:44 UTC | |
|
Re: Getting HTML Source Code where Javascript Redirects Foil LWP
by Art_XIV (Hermit) on Oct 24, 2003 at 19:21 UTC | |
|
Re: Getting HTML Source Code where Javascript Redirects Foil LWP
by petdance (Parson) on Oct 25, 2003 at 02:45 UTC |