Home > other >  Python using simulated login requests, how to get into the next after a successful login to the URL
Python using simulated login requests, how to get into the next after a successful login to the URL

Time:09-18

Python using simulated login requests, how to get to the next page after a successful login URL

CodePudding user response:

302 jump?

CodePudding user response:

Browser first to make sure there are no jump URL, also may be JS himself to modify the page content

CodePudding user response:

A 202

CodePudding user response:

There are several kinds of methods,
1. Use session
2. Using cookies
Use session, on the post using the session, directly using the url below the get/post
Eg.
# post - user& The PWD
S=requests. The Session ()
Login_page=supachai panitchpakdi ost (login_url, headers=Agent, data=https://bbs.csdn.net/topics/dataForm)
Print (" login_page code: "+ STR (login_page. Status_code))

# after landing the get - bug list
R=s.g et (get_url, params=payload and headers=the Agent)
  • Related