How can I get the content of a web site using http library

kyosohma at gmail.com kyosohma at gmail.com
Thu Mar 29 22:19:06 CEST 2007


On Mar 29, 3:07 pm, Thorsten Kampe <thors... at thorstenkampe.de> wrote:
> * silverburgh.me... at gmail.com (29 Mar 2007 12:18:19 -0700)
>
> > I am trying to get the content of a web site like this:
> > But my question is how can I do a 'GET' request without putting the '/
> > index.html''
>
> import urllib
> print urllib.urlopen('http://www.yahoo.com/').read()

Posting to a form:

urllib:
http://www.thescripts.com/forum/thread23871.html

httplib:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
http://www.python.org/infogami-faq/library/how-can-i-mimic-cgi-form-submission-method-post/

Mike




More information about the Python-list mailing list