http request doesn't work!

bart3rNOSPAM at bart3rNOSPAM at
Fri Mar 26 04:58:50 CET 2004

Could someone please let me know what i'm doing wrong here:


import httplib

#WEB_SITE = ''
#PAGE_PATH = '/about.html'
PAGE_PATH = '/htm/un-metered-sites-ip-list.htm'
http = httplib.HTTP(WEB_SITE)
http.putrequest('GET', PAGE_PATH)
http.putheader('Accept', 'text/html')
http.putheader('Accept', 'text/plan')
httpcode, httpmsg, headers = http.getreply()
print 'msg: ' + httpmsg
print httpcode
doc = http.getfile()
data =
print data

The output of the above is different if you go to the following in
your browser:

Whats my problem?!?!??!

More information about the Python-list mailing list