(self)
| 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) |
no test coverage detected