is there a python object which can interpret java-script?

Kartic removethis.kartic.krishnamurthy at gmail.com
Mon May 9 08:09:20 EDT 2005


The Great 'Alexander Fillips' uttered these words on 5/9/2005 7:34 AM:
> Hi,
> 
> my short question:
> 
> is there a python object which can interpret java-script?
> 
> the whole story ;-)
> 
> I wrote some streaming-scripts for the xbox mediaplayer which supports 
> python. for a new script i tried to filter the stream-url from an 
> website. it seems, that the site ist using java-script and the url is 
> only visible if the java-script was interpreted. i am using urllib to 
> retrieve the page.. but it seems that urllib is not ready for 
> java-script...

http://wwwsearch.sourceforge.net/python-spidermonkey/ is a 
Python-Javascript bridge.

To do what you are trying, you will have to execute the Javascript in 
that web page in the context of the page you are downloading...I am not 
quite sure how you will go about doing that without re-inventing what a 
Javascript-enabled browser does.

Knowing nothing about the Xbox environment, here is a suggestion that I 
feel will make your task easier. Can you not use javascript-enabled 
links text browser to access the page and capture the output HTML source 
from links into Python? (Or if you can use win32all, you can automate IE 
to view source and process that source in Python to get your URL)

Thanks,
-Kartic



More information about the Python-list mailing list