ok, so I am trying to put together a program for work that scrapes logs from the machines I work on (S17+/T17+ bitmain miners) but I'm stuck with authenticating the session. I am trying to use the requests module and currently have the fallowing test code to login
import requests
def ty(d):#ignore, just my type tool
return type(d).__name__
cred = {"Username" : "root", "Password" : "root"}#credentials for logging in
#when you into a browser, you would enter this into a browser prompt
#predefining some stuff
post = None
data = None
with requests.Session() as session:#opens a new session
post = session.post("http://10.0.4.1", data = cred)#attempts to connect, but gets 401 response
data = session.get("http://10.0.4.1/kernelLog.html")#same thing here
post#just spits out what the test code got bc making this in vs code
data
so as for the machines they are set up on a local network. when we login to them in a browser they prompt us for the login witch is root for both the user and pass, I could be naming the credentials wrong but I don't know how to even check that so just named them what the window prompt has them listed as
images of what it looks like to login to them... https://drive.google.com/file/d/1Uyh5vvTi4F68vsKdpzsJesPREo6WGa9l/view?usp=sharing
the main screen I am trying to get into and the url... https://drive.google.com/file/d/16uxeOJNXWZ-ip5xx7BFkzFC168CXebeO/view?usp=sharing
and finally the screen with the kernel log that I plan to rip when I get it to not 401... https://drive.google.com/file/d/19sIM0EPSp6Ti5GDLqN8qCx07E6ItMj43/view?usp=sharing
I should probably add that I am pretty rusty with my programming so apologies if this has a really dumb fix I'm missing.
If any other data is needed, ask and I will try to get back with it.