Is it possible to use sockets to login to a website that uses php?

Jeremy Dillworth jdillworth at gmail.com
Mon Nov 19 23:14:56 EST 2007


On Nov 19, 3:37 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Mon, 19 Nov 2007 15:01:16 -0300, Lamonte Harris <pyth0nc0... at gmail.com>
> escribió:
>
> > I need to some how make a script that logs into a website from my desktop
> > and I can do the rest and grab the information on my on hopefully.  How
> > would I login to a website using sockets with python?
>
> See the urllib2 module.
>
> --
> Gabriel Genellina

You may also want to have a look at the Twill project:

http://darcs.idyll.org/~t/projects/twill/doc/

Twill is a testing tool which can login to web apps as you describe.
It also has a Python API here:

http://darcs.idyll.org/~t/projects/twill/doc/python-api.html

- Jeremy Dillworth



More information about the Python-list mailing list