Website Authentication
Well, first, your content-type is off (it should be application/x-www-form-urlencoded), but second, the login page seems to check the Referer. Simply adding
"Referer": url,
to your headers2 dict would do the trick.
This should help you answer any questions:
(edited by Healix.5819)
Thanks for the references, Healix. Those will come in handy.
Snowman, adding the entry to the dictionary was just the trick. How did you know about or where did you find reference to “Referer”?
How did you know about or where did you find reference to “Referer”?
When making a login script, you simply replicate the headers your web browser would send. Discovering that the referrer is required is simply a task of trial and error.