Help parsing a page with python

2010-01-27 Thread mierdatutis mi
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?
Many thanks and sorry for my english!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help parsing a page with python

2010-01-27 Thread mierdatutis mi
Those videos are generated by javascript.
There is some parser with python for javascript???

Thanks a lot!


2010/1/27 Simon Brunning 

> 2010/1/27 mierdatutis mi :
> > 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.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help parsing a page with python

2010-01-27 Thread mierdatutis mi
Hello again,

What test case for Windmill? Can you say me the link, please?

Many thanks

2010/1/27 Javier Collado 

> 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 :
> > Those videos are generated by javascript.
> > There is some parser with python for javascript???
> >
> > Thanks a lot!
> >
> >
> > 2010/1/27 Simon Brunning 
> >>
> >> 2010/1/27 mierdatutis mi :
> >> > 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.
> >> --
> >> http://mail.python.org/mailman/listinfo/python-list
> >
> >
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help parsing a page with python

2010-01-27 Thread mierdatutis mi
Hello,

Thanks Javier,

But I think that the page embeds a viewer. Only the viewer knows the URL to
the FLV file itself. I can't see any direct correspondence between the
elements of the two URLs,  I cant see a way to construct the FLV's URL from
the contents of that page :-(

I have to do manually, I dont see other way :-(

Many thanks for your answer
Muchas gracias





2010/1/27 Javier Collado 

> 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 :
> > Hello again,
> >
> > What test case for Windmill? Can you say me the link, please?
> >
> > Many thanks
> >
> > 2010/1/27 Javier Collado 
> >>
> >> 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 :
> >> > Those videos are generated by javascript.
> >> > There is some parser with python for javascript???
> >> >
> >> > Thanks a lot!
> >> >
> >> >
> >> > 2010/1/27 Simon Brunning 
> >> >>
> >> >> 2010/1/27 mierdatutis mi :
> >> >> > 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.
> >> >> --
> >> >> http://mail.python.org/mailman/listinfo/python-list
> >> >
> >> >
> >> > --
> >> > http://mail.python.org/mailman/listinfo/python-list
> >> >
> >> >
> >> --
> >> http://mail.python.org/mailman/listinfo/python-list
> >
> >
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


get a field

2010-02-15 Thread mierdatutis mi
Hi,

I have this:

pe="
http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml
"


I would like to extract this: 691046.shtml

But is dynamically. Not always have the same lenght the string.

Could you help me how could I do extract this in python?

Many thanks and sorry for my English!
-- 
http://mail.python.org/mailman/listinfo/python-list


connect to ms sql server with odbc

2009-08-30 Thread mierdatutis mi
Hi,

I'm newbie in python. I try to connect to remote server with ms sql
server from my ubuntu. I install pyodbc and I do:

 >>> conn = >>> Conn =
 pyodbc.connect("DRIVER=
{FreeTDS};SERVER=defekas62;UID=emuser;PWD=temporal;DATABASE=em620")
pyodbc.connect ( "DRIVER = () FreeTDS; SERVER = defekas62; UID =
emuser; PWD = temporal; em620 DATABASE =")
 cursor = conn.cursor() cursor = conn.cursor ()
 >>> for row in cursor.execute("select USERNAME from JOBACTIONS"): >>>
Para la fila en cursor.execute ( "usuario seleccionar de
JOBACTIONS"):
 ... ... print row.USERNAME row.USERNAME de impresión
   File "", line 2 Archivo "", línea 2
 print row.USERNAME row.USERNAME de impresión
 ^ ^
 IndentationError: expected an indented block
Why this error?
Many thanks and sorry for my english
-- 
http://mail.python.org/mailman/listinfo/python-list