[John Lee]
> That's not a small amount of work you've just set Warren to do.  :-)
>
> (speaking as somebody who made a semi-serious attempt at it, in Python)

[deborah sciales]
> Well, I guess it depends on his set of needs, and he does have
> tokeparser and treebuilder, etc to use.
>
> If his javascript is inside of script tags, he can use treebuilder to
> get those nodes, and then work with them. I see a host of Javascript
> modules on CPAN.
>
> Here's why I would not try to write this in Python just yet, unless i
> had the time:
>
> Perl -MCPAN -e shell;
>
> cpan>  i/JavaScript/
>
>
> use a module from CPAN, use a few modules from CPAN, or patch and
> improve a module!

I don't think people here are interested in Python/Perl comparisons.

Nevertheless, the problems with the existing libraries for either language
are roughly the same, AFAICT (I too started with existing libraries.
That was kind of the easy part).

Are there a *specific* set of HTML parsing, HTML (not XML) DOM-building
(with all the <script> functionality & subtleties), JavaScript handling
(etc.) libraries you're thinking of?  As far as I know, decent libraries
for doing such things for this purpose don't exist *anywhere* but in
Mozilla and IE.  If you know better (you may well do), please do let us
all know!


[deborah sciales]
> The reason we are still using Perl for fast work, or a major reason is
> CPAN. LWP is a part of that.

I like CPAN too.


> I don't have time to look through the javascript modules, but something
> might be useful, and you could incorporate it into your current test
> script base without switching to a new testing enviro...?

Indeed.  The Perl version of the relevant module doesn't *quite* have the
functionality needed to do what you suggested, though.  Somebody
interested could copy such functionality from the Python version <wink> --
you can find it in the standard place, PyPI (named python-spidermonkey).


John

Reply via email to