MCPcopy Index your code
hub / github.com/pyload/pyload / handle_free

Method handle_free

module/plugins/hoster/LoadTo.py:45–67  ·  view source on GitHub ↗
(self, pyfile)

Source from the content-addressed store, hash-verified

43 self.chunk_limit = 1
44
45 def handle_free(self, pyfile):
46 #: Search for Download URL
47 m = re.search(self.LINK_FREE_PATTERN, self.data)
48 if m is None:
49 self.error(_("LINK_FREE_PATTERN not found"))
50
51 self.link = m.group(1)
52
53 #: Set Timer - may be obsolete
54 m = re.search(self.WAIT_PATTERN, self.data)
55 if m is not None:
56 self.wait(m.group(1))
57
58 #: Load.to is using SolveMedia captchas since ~july 2014:
59 self.captcha = SolveMedia(pyfile)
60 captcha_key = self.captcha.detect_key()
61
62 if captcha_key:
63 response, challenge = self.captcha.challenge(captcha_key)
64 self.download(self.link,
65 post={'adcopy_challenge': challenge,
66 'adcopy_response': response,
67 'returnUrl': pyfile.url})

Callers

nothing calls this directly

Calls 8

SolveMediaClass · 0.90
_Function · 0.50
searchMethod · 0.45
errorMethod · 0.45
waitMethod · 0.45
detect_keyMethod · 0.45
challengeMethod · 0.45
downloadMethod · 0.45

Tested by

no test coverage detected