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 @ 2017-10-27 15:32  小水皮  阅读(4739)  评论(0编辑  收藏  举报