[Tutor] queries from the web & random number
linuxian iandsd
pylinuxian at gmail.com
Thu Apr 10 20:32:37 CEST 2008
I modified old script - added
get_img=urllib2.urlopen('http://website.com/jcaptcha.jpg')
> secret_img=open('/home/iandsd/secret_img.jpg','wb')
> secret_img.write(get_img.read())
> secret_img.close()
>
and then to add the value to the dictionary :
values['captcha']=raw_input("Enter the number you see on picture :")
>
data=urllib.urlencode(values)
> req=urllib2.Request(url, data, headers)
>
>
& i m on the road again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080410/5435d5fe/attachment-0001.htm
More information about the Tutor
mailing list