

def spider_opened(self, spider):
    usr = getattr(spider, 'http_user', '')
    pwd = getattr(spider, 'http_pass', '')
    if (usr or pwd):
        self.auth = basic_auth_header(usr, pwd)

dataset/ETHPy150Open wcong/ants/ants/contrib/downloadermiddleware/httpauth.py HttpAuthMiddleware.spider_opened/original