Thursday, April 30, 2015

python - Replicating Chrome http authentication for a website

At work, I have a process that requires me to build a table based on information I find on an intranet website. So far I have done this by hand: I get the information using the form on the website and I input it into an access table which I upload to our company database. I thought I would try and automate this procedure using Python's get command from the requests library. However, the get request returned a 401 status code. Apparently I need authentication to access that information. Google Chrome and Internet Explorer both do that authentication automatically, it seems. I can't quite figure out how to do it though. The headers variable of the get Response states that the authentication being used is "Negotiate, NLTM." My question is, is there an easy way to determine what credentials Chrome/Explorer are providing to the server?


Thanks

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...