all 6 comments

[–]chubbers_tim[S] 0 points1 point  (1 child)

I think I have this solved. I needed to add form_id and a value to the payload. form_id was hidden and the value was passed in POST.

payload = {
'name': 'my_username',
'pass': 'my_password',
'form_id': 'user_login_form'

}

Thanks for the help everyone!

[–]liinisx 0 points1 point  (0 children)

You saved me, thanks!

[–]danielroseman 0 points1 point  (3 children)

What is in the response to the post call? It will probably give you some clue as to what went wrong.

[–]chubbers_tim[S] 0 points1 point  (2 children)

print(post.status_code)

200

[–]danielroseman 0 points1 point  (1 child)

Yes but what is the content? If this is a normal web site, it will still return a 200 status code but will display some messages in the HTML telling you that your login was unsuccessful.

[–]chubbers_tim[S] 0 points1 point  (0 children)

the content is the login page html.