Home > other >  Super small white help python web log and data acquisition
Super small white help python web log and data acquisition

Time:09-29

I have a fish tank water quality monitor, bring their own water quality parameters of network to log in to see, I hope that through the python after login page for water quality parameters, automatically send information to my cell phone or email every day to the dynamic monitoring of water quality, the Internet login page is as follows:

The login page source information is as follows:

Source code after login information is as follows:


Very simple login information, there is no user name, fill password can log in directly, because I'm too dishes, tried a lot of online teaching method can realize the login, consult everybody how successful login first, and obtain the data I hook line, hope to be able to give the code, thank you very much!

CodePudding user response:

The selenium landing simulation

CodePudding user response:

references on 1st floor day I reply:
selenium simulation log in

Thank you, and I study, the selenium simulation login is successful, I would like to know how requests method is successful, I have failed, is related to the login button is an input, using conventional method requests?

CodePudding user response:

Find log in the URL of the first, and then use the post method requests operating
It is better to check the login URL in the web developer tools post parameters, these parameters is introduced into the data parameter of the post method (in the form of a dictionary)
The basic parameters of the post method:
Requests. Post (url, data, headers)

CodePudding user response:

reference Hajo_ reply: 3/f
find log in the URL of the first, and then use the requests of the post method operation
It is better to check the login URL in the web developer tools post parameters, these parameters is introduced into the data parameter of the post method (in the form of a dictionary)
The basic parameters of the post method:
Requests. Post (url, data, headers)

The elder brothers, I tried, can't log in, I see the form in the header data is as follows:
Password:
Button: Login
But can you tell me how to write the data information, I tried a {' password ':' XXXX '} and {' password ':' XXXX ', 'button' : 'Login'} is not, after the print is the code for the Login screen, enter the Login interface, give advice or comments please!!!!!!

CodePudding user response:

Forgot to say, the content-type Type to application/x - WWW - form - urlencoded send a POST request, please take your action!!!!!!
  • Related