[Web-SIG] [Fwd: Summer of Code preparation]

Alan Kennedy pywebsig at alan.kennedy.name
Tue Apr 18 12:04:24 CEST 2006


[Titus Brown]
> I'm thinking of proposing a project to build a JavaScript interpreter
> interface for Python; the goal (for me) is to get twill/mechanize to
> understand JavaScript.  I think the project has wider applications,
> but I'm not sure what people actually want to do with JavaScript.
> I could imagine server-side parsing of javascript, and/or integration of
> javascript and python code.  Thoughts?

Have you looked at WebCleaner? WebCleaner is a filtering HTTP proxy,
written in python.

http://webcleaner.sourceforge.net/

WebCleaner uses the Mozilla SpiderMonkey javascript engine to execute
JS from web pages: From the webcleaner front page

"""
Another feature is the JavaScript filtering: JavaScript data is
executed in the integrated Spidermonkey JavaScript engine which is
also used by the Mozilla browser suite. This eliminates all JavaScript
obfuscation, popups, and document.write() stuff, but the other
JavaScript functions still work as usual.
"""

Perhaps webcleaner has code that already does what you need? Although
the GPL licensing might be problematic.

Regards,

Alan.


More information about the Web-SIG mailing list