2024-04-29 03:57:42 发布
网友
我想在Python中复制以下curl命令。在
curl -u : --negotiate -k https://example.com/authenticate
我遵循了这个pycurl的例子,效果很好 http://www.deplication.net/2014/02/curl-with-kerberos-authentication.html
有没有一种方法可以用Python请求模块来实现呢?在
谢谢!!在
您可以尝试这个项目:https://pypi.org/project/requests-negotiate/,或者如果您使用的是Kerberos:https://pypi.org/project/requests-kerberos/
无论哪种情况,您的代码都将如下所示:
auth = HTTPNegotiateAuth() # or: HTTPKerberosAuth() response = requests.get('https://example.com/authenticate', auth=auth, verify=False)
您可以尝试这个项目:https://pypi.org/project/requests-negotiate/,或者如果您使用的是Kerberos:https://pypi.org/project/requests-kerberos/
无论哪种情况,您的代码都将如下所示:
相关问题 更多 >
编程相关推荐