(self)
| 180 | return links |
| 181 | |
| 182 | def handle_weblinks(self): |
| 183 | links = [] |
| 184 | |
| 185 | weblinks = re.findall(self.WEB_LINK_PATTERN, self.data) |
| 186 | for weblink in weblinks: |
| 187 | html = self.load(weblink) |
| 188 | link = self.last_header['url'] |
| 189 | if link == "https://cript.to/bot": |
| 190 | for _i in range(3): |
| 191 | url, inputs = parse_html_form("/bot", html) |
| 192 | if inputs is None or "circlecaptcha" not in html: |
| 193 | continue |
| 194 | |
| 195 | captcha_url = "https://cript.to/captcha/circlecaptcha" |
| 196 | captcha_code = self.captcha.decrypt(captcha_url, input_type="png", output_type='positional') |
| 197 | inputs['button.x'] = captcha_code[0] |
| 198 | inputs['button.y'] = captcha_code[1] |
| 199 | html = self.load(url, post=inputs) |
| 200 | link = self.last_header['url'] |
| 201 | if not link.startswith("https://cript.to"): |
| 202 | self.captcha.correct() |
| 203 | break |
| 204 | |
| 205 | else: |
| 206 | self.captcha.invalid() |
| 207 | |
| 208 | else: |
| 209 | self.log_warning(_("Could not parse weblink (bot)")) |
| 210 | links = [] |
| 211 | break |
| 212 | |
| 213 | if link: |
| 214 | links.append(link) |
| 215 | |
| 216 | return links |
| 217 | |
| 218 | def handle_DLC(self): |
| 219 | return [] #: Not yet :( |
nothing calls this directly
no test coverage detected