468,283 Members | 2,017 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,283 developers. It's quick & easy.

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

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...

the site:
http://www.prosieben.de/show_comedy/..._video/07029//

the url i need:
http://redirect.streaming.szm.de/red...ttenladen.wmv&
i hoper someone has an idea...

cya
Alex
Jul 19 '05 #1
3 2080
Alexander Fillips wrote:
Hi,

my short question:

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

the whole story ;-)


google("python javascript")

First link is a Python binding to the SpiderMonkey JavaScript
interpreter from the Mozilla project. It's unmaintained, and I've never
tested it, but it's worth a try.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #2
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
Jul 19 '05 #3
Kartic wrote:
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)


if the xbox media player is active there is only support for python. it
is possible to run linux on the xbox, but not at the same time as xbmc
is active. i found a browser for the xbox (linksboks) but here still the
same problem. thank for your tips...

Alex
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

29 posts views Thread by Maurice LING | last post: by
13 posts views Thread by Ajay | last post: by
reply views Thread by Wolfgang Schwanke | last post: by
118 posts views Thread by 63q2o4i02 | last post: by
reply views Thread by Kurt B. Kaiser | last post: by
112 posts views Thread by mystilleef | last post: by
4 posts views Thread by fortepianissimo | last post: by
122 posts views Thread by Edward Diener No Spam | last post: by
53 posts views Thread by Vicent Giner | last post: by
reply views Thread by Robert Kern | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.