def process_spider_output(self, response, result, spider):
        def _filter(request):
            if isinstance(request, Request) and len(request.url) > self.maxlength:
                log.spider_log("Ignoring link (url length > " + self.maxlength + "):" + request.url,
                               level=log.DEBUG, spider=spider)
                return False
            else:
                return True

        return (r for r in result or () if _filter(r))
dataset/ETHPy150Open wcong/ants/ants/contrib/spidermiddleware/urllength.py/UrlLengthMiddleware.process_spider_output/original