0

So I am trying to scrape a webpage but there is a user/password field required before the page can be accessed (I think it's one of those .htaccess things? not sure what you call them). I know the user/pass normally but can't figure out how to bind it in the code. How do I send the user/pass when I access the page?

If I do it without the user/pass I just get a 401 Unauthorized error.

MyNameIsKhan
  • 2,584
  • 8
  • 33
  • 52

1 Answers1

0

Assuming the authentication is requested by the server, rather than the webpage, you could try sending the credentials in the page URL:

https://stackoverflow.com/a/18264755/3457753

Community
  • 1
  • 1
Jason Baker
  • 2,392
  • 3
  • 21
  • 26