wget.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:vsi_common 作者: VisionSystemsInc 项目源码 文件源码
def authorize_basic(user=None, password=None, realm=None, uri=None):
  ''' Call before calling download '''
  if user and password and realm and uri:
    auth_handler = urllib2.HTTPBasicAuthHandler()
    auth_handler.add_password(realm=realm, uri=uri, user=user, passwd=password)
    opener = urllib2.build_opener(auth_handler)
    urllib2.install_opener(opener)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号