开发者

Handling reCaptcha forms?

I'm trying to write a simple program that logs on to a site开发者_开发技巧, does something and logs out. The problem is that the login form has three inputs: username, password and a recaptcha. I input all of them manually. The problem is I don't know how to display the captcha image or how to send the text.

Can someone explain how to do it?


It is unreasonable to except that someone will post a complete solution for your problem. Here are the steps, just start by trying to complete them, post questions if you get stuck. very generally speaking:

  1. Get the content of the site (use the urllib2 to fetch the page)
  2. Parse the recaptcha image link and download the image (BeautifulSoup for parsing the link, urllib2 again for downloading the image)
  3. prompt yourself with the image and input for the code (use Tkinter for example)
  4. send login info & captcha( urllib2)
  5. do stuff (urllib2 again)

There's probably some token that you also have to fetch that identifies your Captcha image. Use firebug to watch for the requests sent when submitting the Captcha.


http://code.google.com/apis/recaptcha/docs/aspnet.html

look to this link :: it explains how to use recaptcha for several languages ..

i used it in my asp.net application...

i don't know how to use it in python

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜