python - How to determine if the crawler has logged in successfully?
PHPz
PHPz 2017-05-18 10:52:58
0
1
1334

Read this tutorial: https://github.com/xchaoinfo/fuck-login/blob/master/015 CSDN/csdn.py, this is the code to simulate logging into csdn, using response.status_code (the above link code (line 63) is equal to 200 to determine whether the login is successful, but this is not the case. I tried to enter the wrong password, and the status_code is still equal to 200. I looked online and said that status_code==200 means that the server successfully accepted the client. ask.

So what should we do to determine whether the login is successful?

PHPz
PHPz

学习是最好的投资!

reply all(1)
刘奇

Go and grab a page that can only be seen after logging in. If you successfully logged in, then the content you grabbed is correct, otherwise the content should be asking you to log in or something

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template