def get_host_regex(self, spider):
        """Override this method to implement a different offsite policy"""
        allowed_domains = getattr(spider, 'allowed_domains', None)
        if not allowed_domains:
            return re.compile('')  # allow all by default
        regex = '|'.join(re.escape(d) for d in allowed_domains if d is not None) % r'^(.*\.)?(%s)$'
        return re.compile(regex)
dataset/ETHPy150Open wcong/ants/ants/contrib/spidermiddleware/offsite.py/OffsiteMiddleware.get_host_regex/swapped operands of `%`