MCPcopy
hub / github.com/pyload/pyload / captcha_task

Method captcha_task

module/plugins/hooks/IRC.py:69–79  ·  view source on GitHub ↗
(self, task)

Source from the content-addressed store, hash-verified

67 pass
68
69 def captcha_task(self, task):
70 if self.config.get('captcha') and task.isTextual():
71 task.handler.append(self)
72 task.setWaiting(60)
73
74 html = self.load("http://www.freeimagehosting.net/upl.php",
75 post={'file': (pycurl.FORM_FILE, task.captchaParams['file'])})
76
77 url = re.search(r"src='([^']+)'", html).group(1)
78 self.response(_("New Captcha Request: %s") % url)
79 self.response(_("Answer with 'c %s text on the captcha'") % task.id)
80
81 def run(self):
82 #: Connect to IRC etc.

Callers

nothing calls this directly

Calls 8

responseMethod · 0.95
isTextualMethod · 0.80
setWaitingMethod · 0.80
_Function · 0.50
getMethod · 0.45
appendMethod · 0.45
loadMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected