def checkCaptchaValue(random, input): """ Check the captcha using Captchas.net service """ from CaptchasDotNet import CaptchasDotNet captcha = CaptchasDotNet(client=CAPTCHAS_NET_USER, secret=CAPTCHAS_NET_SECRET) return captcha.verify(input, random)
def getCaptchaImage(self): """ Get a captcha image from Captchas.net service, using bitakora's user and password""" from CaptchasDotNet import CaptchasDotNet captcha = CaptchasDotNet(client=CAPTCHAS_NET_USER, secret=CAPTCHAS_NET_SECRET) rnd = captcha.random() img = captcha.image() return rnd, img