[idolcomplex] fix 429 error during login by adding a 10s delay
This commit is contained in:
@@ -90,9 +90,11 @@ class IdolcomplexExtractor(SankakuExtractor):
|
|||||||
"user[password]": password,
|
"user[password]": password,
|
||||||
"commit" : "Login",
|
"commit" : "Login",
|
||||||
}
|
}
|
||||||
|
self.sleep(10, "login")
|
||||||
response = self.request(url, method="POST", headers=headers, data=data)
|
response = self.request(url, method="POST", headers=headers, data=data)
|
||||||
|
|
||||||
if not response.history or response.url.endswith("/user/home"):
|
if not response.history or response.url.endswith(
|
||||||
|
("/users/login", "/user/home")):
|
||||||
raise exception.AuthenticationError()
|
raise exception.AuthenticationError()
|
||||||
return {c.name: c.value for c in response.history[0].cookies}
|
return {c.name: c.value for c in response.history[0].cookies}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user