1

I am writing a script that automatically scrapes an image from a local address (the image is created using an IP camera). However, when I want to access the website I get the following popup

enter image description here

What type of pop-up is this? I tried to sign in using the ntml request package in python, however this does not work and therefore I think it is a different type of pop-up.

LMATH
  • 45
  • 6
  • https://stackoverflow.com/questions/9859627/how-to-prevent-browser-to-invoke-basic-auth-popup-and-handle-401-error-using-jqu – snakecharmerb Jul 28 '18 at 06:57

1 Answers1

1

Start here for deeper information on this: https://en.wikipedia.org/wiki/Basic_access_authentication

In short:

It is generated by your browser as the server answered the request with the "WWW-Authenticate: Basic"-Header being set. Now your browser shows up this popup and would send the credentials you've entered to the server.

Attention:

All input will be sent unencrypted. So you need to encrypt the connection using HTTPS in order to maintain secrecy. Otherwise the credentials could be stolen and misused. As your webcam does not have HTTPS i hope your private network is shielded properly.

Solution how to implement it in Python:

This question was already asked before and is answered here, including a snippet that shows how: Python, HTTPS GET with basic authentication

Akar
  • 534
  • 5
  • 6