Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Help parsing a page with python

0 views
Skip to first unread message

Simon Brunning

unread,
Jan 27, 2010, 5:13:32 AM1/27/10
to pytho...@python.org
2010/1/27 mierdatutis mi <mmm...@gmail.com>:
> Hi,
>
> I would like to parse a webpage to can get the url of the video download. I
> use pyhton and firebug but I cant get the url link.
>
> Example:
>
> The url where I have to get the video link is:
> http://www.rtve.es/mediateca/videos/20100125/saber-comer---salsa-verde-judiones-25-01-10/676590.shtml"
>
> The video is
> http://www.rtve.es/resources/TE_SSAC011/flv/8/2/1264426362028.flv
> Could you help me please?

That URL doesn't appear to be in the HTML - it must be being brought
in by the JavaScript somehow.

--
Cheers,
Simon B.

Simon Brunning

unread,
Jan 27, 2010, 6:51:05 AM1/27/10
to pytho...@python.org
2010/1/27 mierdatutis mi <mmm...@gmail.com>:
> Those videos are generated by javascript.
> There is some parser with python for javascript???

There is <http://github.com/davisp/python-spidermonkey>, but
simulating the whole context of a browser is going to be a horror.

You are probably far better off automating a real browser. WebDriver
(<http://bit.ly/crAEPu>) has Python bindings these days. It's
primarily intended for functional testing, but it might be a good fit
here too.

--
Cheers,
Simon B.

Javier Collado

unread,
Jan 27, 2010, 7:00:53 AM1/27/10
to pytho...@python.org
Hello,

A test case for Windmill might also be used to extract the information
that you're looking for.

Best regards,
Javier

2010/1/27 mierdatutis mi <mmm...@gmail.com>:
> Those videos are generated by javascript.
> There is some parser with python for javascript???
>

> Thanks a lot!
>
>
> 2010/1/27 Simon Brunning <si...@brunningonline.net>

>> --
>> http://mail.python.org/mailman/listinfo/python-list
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>

Simon Brunning

unread,
Jan 27, 2010, 7:14:23 AM1/27/10
to pytho...@python.org
2010/1/27 mierdatutis mi <mmm...@gmail.com>:
> Hello again,
>
> What test case for Windmill? Can you say me the link, please?

http://lmgtfy.com/?q=windmill+test

--
Cheers,
Simon B.

Javier Collado

unread,
Jan 27, 2010, 9:07:15 AM1/27/10
to pytho...@python.org
Hello,

You can find some advice here:
http://www.packtpub.com/article/web-scraping-with-python-part-2

Best regards,
Javier

2010/1/27 mierdatutis mi <mmm...@gmail.com>:
> Hello again,
>
> What test case for Windmill? Can you say me the link, please?
>

> Many thanks
>
> 2010/1/27 Javier Collado <javier....@gmail.com>

0 new messages