diff --git a/scrapypuppeteer/response.py b/scrapypuppeteer/response.py index fecbe39..1246ab6 100644 --- a/scrapypuppeteer/response.py +++ b/scrapypuppeteer/response.py @@ -122,7 +122,7 @@ def __init__(self, url, puppeteer_request, context_id, page_id, data, **kwargs): super().__init__(url, puppeteer_request, context_id, page_id, **kwargs) -class PuppeteerRecaptchaSolverResponse(PuppeteerJsonResponse): +class PuppeteerRecaptchaSolverResponse(PuppeteerJsonResponse): # TODO: to inherit from HTMLResponse (or think about better solution to the problem!) """ Response for RecaptchaSolver. Result is available via self.recaptcha_data and self.data["recaptcha_data"] diff --git a/tests/mockserver.py b/tests/mockserver.py index a9ece98..99c8504 100644 --- a/tests/mockserver.py +++ b/tests/mockserver.py @@ -137,9 +137,14 @@ def _form_response(self, page_id, context_id, close_page): class RecaptchaSolver(LeafResource): def _form_response(self, page_id, context_id, close_page): + html = """ + clicked + """ return { "contextId": context_id, "pageId": page_id, + "html": html, + "cookies": None, "recaptcha_data": { "captchas": [1], # 1 captcha "some_other_fields": [],