From e7d4544be9afd763883793a85a1254006a681784 Mon Sep 17 00:00:00 2001 From: matthew Date: Fri, 28 Jun 2024 17:06:48 +0300 Subject: [PATCH] Print -> self.log --- examples/spiders/auto_recaptcha.py | 5 ++--- examples/spiders/manual_recaptcha.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/spiders/auto_recaptcha.py b/examples/spiders/auto_recaptcha.py index 332a16c..ee22a24 100644 --- a/examples/spiders/auto_recaptcha.py +++ b/examples/spiders/auto_recaptcha.py @@ -54,6 +54,5 @@ def make_screenshot(self, response: PuppeteerScreenshotResponse, **kwargs): with open("imageToSave.png", "wb") as fh: fh.write(base64.b64decode(data)) - @staticmethod - def error(failure: Failure): - print("We are in error function!") + def error(self, failure: Failure): + self.log("We are in error function!") diff --git a/examples/spiders/manual_recaptcha.py b/examples/spiders/manual_recaptcha.py index 9fb44d7..16e61e6 100644 --- a/examples/spiders/manual_recaptcha.py +++ b/examples/spiders/manual_recaptcha.py @@ -59,6 +59,5 @@ def make_screenshot(self, response: PuppeteerScreenshotResponse, **kwargs): with open("imageToSave.png", "wb") as fh: fh.write(base64.b64decode(data)) - @staticmethod - def error(failure: Failure): - print("We are in error function!") + def error(self, failure: Failure): + self.log("We are in error function!")