I have the following python script and it works beautifully.
import urllib2 url = \'http://abc.com\' # write the url here usock = urllib2.urlopen(url) dat
Do you absolutely have to do it that way? How about using something like twill ( http://twill.idyll.org/) - makes what you want to do very easy (and it's Python).