[mod_python] httplib questions

Doug Gray dgray at coldstorage.com
Sun Apr 25 14:45:08 EST 2004

Im trying to capture information from a site that I need to log into first
but Im having problems making it work.


Python 2.3.3



Im using the following example as my start


Import httplib,urllib

params = urllib.urlencode({'username': 'test', 'password': 'test')

headers = {"Content-type": "application/x-www-form-urlencoded","Accept":

conn = httplib.HTTPConnection("fantasygames.sportingnews.com")

conn.request("POST", "/crs/home_check_reg.html", params, headers)

response = conn.getresponse()

return response.status



the status that is returned is 302 which I think is something to do with



1.     How do I handle 302s??

2.     can sites block you from capture data in which you are a member of
that site.

3.     Is there a good forum for Python so I can do a detailed search on the
topic of capturing web source from websites.






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20040425/ee5e779a/attachment.html

More information about the Mod_python mailing list