[sankaku] send login info as formdata
Previously they were erroneously send as URL parameters.
This commit is contained in:
@@ -130,14 +130,14 @@ class SankakuExtractor(SharedConfigExtractor):
|
|||||||
"""Actual login implementation"""
|
"""Actual login implementation"""
|
||||||
username = usertuple[0]
|
username = usertuple[0]
|
||||||
self.log.info("Logging in as %s", username)
|
self.log.info("Logging in as %s", username)
|
||||||
params = {
|
data = {
|
||||||
"url": "",
|
"url": "",
|
||||||
"user[name]": username,
|
"user[name]": username,
|
||||||
"user[password]": password,
|
"user[password]": password,
|
||||||
"commit": "Login",
|
"commit": "Login",
|
||||||
}
|
}
|
||||||
response = self.request(self.root + "/user/authenticate",
|
response = self.request(self.root + "/user/authenticate",
|
||||||
method="POST", params=params)
|
method="POST", data=data)
|
||||||
if not response.history or response.url != self.root + "/user/home":
|
if not response.history or response.url != self.root + "/user/home":
|
||||||
raise exception.AuthenticationError()
|
raise exception.AuthenticationError()
|
||||||
cookies = response.history[0].cookies
|
cookies = response.history[0].cookies
|
||||||
|
|||||||
Reference in New Issue
Block a user