MCPcopy
hub / github.com/pyload/pyload / solve_captcha

Method solve_captcha

module/plugins/hoster/HitfileNet.py:69–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 self.data = self.load(self.link)
68
69 def solve_captcha(self):
70 action, inputs = self.parse_html_form("action='#'")
71 if not inputs:
72 self.fail(_("Captcha form not found"))
73
74 if inputs['captcha_type'] == "recaptcha2":
75 self.captcha = ReCaptcha(self.pyfile)
76 inputs['g-recaptcha-response'], challenge = self.captcha.challenge()
77 self.captcha.correct()
78
79 else:
80 self.fail(_("Unknown captcha type"))
81
82 self.data = self.load(self.free_url,
83 post=inputs)
84
85 def handle_premium(self, pyfile):
86 m = re.search(self.LINK_PREMIUM_PATTERN, self.data)

Callers 1

handle_freeMethod · 0.95

Calls 7

ReCaptchaClass · 0.90
parse_html_formMethod · 0.80
_Function · 0.50
failMethod · 0.45
challengeMethod · 0.45
correctMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected