(self, pyfile)
| 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}) |
nothing calls this directly
no test coverage detected