python requests实现windows身份验证登录

1.安装ntlm  https://github.com/requests/requests-ntlm

pip install requests_ntlm

2.使用

import requests
from requests_ntlm import HttpNtlmAuth

requests.get("http://ntlm_protected_site.com",auth=HttpNtlmAuth('domain\\username','password'))
posted @ 2018-03-19 15:54  Daniel_Lu  阅读(982)  评论(0编辑  收藏  举报