Search code examples
pythonloggingrequestresponsehttp-status-code-403

Python. Requests. Post. Usual ways to log in don't work


Try to log in in this site "websim.worldquantchallenge.com/login", but usual ways don't work. In most cases and websites we can use next form:

session = requests.session()
url = 'https://websim.worldquantchallenge.com/login'
data = {
    'EmailAddress': '<YOUR_MAIL>', 
    'Password': '<YOUR_PASS'
}
result = session.post(url, data = data)
print(result)

But in this situation I get "response 403".

Simle ways of Authentication as "HTTPBasicAuth" or "HTTPDigestAuth" also do not work. So how can I log in in this case?


Solution

  • First of all, you have to make sure that the website's policy allows login via code.

    If so, the url of the post should be:

    url = 'https://websim.worldquantchallenge.com/login/process'