def spider_opened(self, spider):
        usr = getattr(spider, 'http_user', '')
        pwd = getattr(spider, 'http_pass', '')
        if usr and pwd:
            self.auth = basic_auth_header(usr, pwd)
dataset/ETHPy150Open wcong/ants/ants/contrib/downloadermiddleware/httpauth.py/HttpAuthMiddleware.spider_opened/operator `or` -> `and`