View Single Post
Old Dec 29th, 2005, 7:24 PM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,869
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Submitting POST data

Okay, so using urllib2 I can send GET data easily to a website like so:

import urllib2
opener = urllib2.build_opener()
page = opener.open( 'http://jammersbase.ath.cx?error=Sent%20some%20get%20data...' ).read()
print "Sent GET data successfully!"

But how do you suppose I sent POST data to a website? I need this so I can login to a website using an automated script.

Will urllib2 store your session as if you're browing directly on the site, or is there some fancy thing I need to do for that? :o
Sane is offline   Reply With Quote