def parse(self, response):
        # x_path test
        checker = response.request.meta['checker']
        rpt = response.request.meta['rpt']
        if checker.checker_type == '4':
            self.log("No 404 ({c}).".format(c=str(checker)), logging.INFO)
            return
        if rpt.content_type == 'J':
            json_resp = json.loads(response.body_as_unicode())
            try:
                jsonpath_expr = parse(checker.checker_x_path)
            except JsonPathLexerError:
                raise CloseSpider("Invalid checker JSONPath ({c})!".format(c=str(checker)))
            test_select = [match.value for match in jsonpath_expr.find(json_resp)]
            #self.log(unicode(test_select), logging.INFO)
        else:
            try:
                test_select = response.xpath(checker.checker_x_path).extract()
            except __HOLE__:
                self.log("Invalid checker XPath ({c})!".format(c=str(checker)), logging.ERROR)
                return
        
        if len(test_select) > 0 and checker.checker_x_path_result == '':
            self.log("Elements for XPath found on page (no result string defined) ({c}). Delete reason.".format(c=str(checker)), logging.INFO)
            if self.conf['DO_ACTION']:
                self._del_ref_object()
            return
        elif len(test_select) > 0 and test_select[0] == checker.checker_x_path_result:
            self.log("XPath result string '{s}' found on page ({c}). Delete reason.".format(s=checker.checker_x_path_result, c=str(checker)), logging.INFO)
            if self.conf['DO_ACTION']:
                self._del_ref_object()
            return
        else:
            self.log("XPath result string not found ({c}).".format(c=str(checker)), logging.INFO)
            return
dataset/ETHPy150Open holgerd77/django-dynamic-scraper/dynamic_scraper/spiders/django_checker.py/DjangoChecker.parse