How to use the ruia.exceptions.NotImplementedParseError function in ruia

To help you get started, we’ve selected a few ruia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github howie6879 / ruia / ruia / spider.py View on Github external
async def parse(self, response):
        """
        Used for subclasses, directly parse the responses corresponding with start_urls
        :param response: Response
        :return:
        """
        raise NotImplementedParseError("")
github howie6879 / ruia / ruia / spider.py View on Github external
async def parse(self, response):
        """
        Used for subclasses, directly parse the responses corresponding with start_urls
        :param response: Response
        :return:
        """
        raise NotImplementedParseError('')
github howie6879 / ruia / ruia / spider.py View on Github external
async def handle_request(
        self, request: Request
    ) -> typing.Tuple[AsyncGeneratorType, Response]:
        """
        Wrap request with middleware.
        :param request:
        :return:
        """
        callback_result, response = None, None

        await self._run_request_middleware(request)

        try:
            callback_result, response = await request.fetch_callback(self.sem)
        except NotImplementedParseError as e:
            self.logger.error(e)
        except NothingMatchedError as e:
            self.logger.error(f"")
        except Exception as e:
            self.logger.error(f"
github howie6879 / ruia / ruia / spider.py View on Github external
async def handle_request(self, request: Request) -> typing.Tuple[AsyncGeneratorType, Response]:
        """
        Wrap request with middleware.
        :param request:
        :return:
        """
        callback_result, response = None, None

        await self._run_request_middleware(request)
        try:
            callback_result, response = await request.fetch_callback(self.sem)
        except NotImplementedParseError as e:
            self.logger.error(e)
        except NothingMatchedError as e:
            self.logger.error(f'')
        except Exception as e:
            self.logger.error(f'