[idolcomplex] fix 429 error during login by adding a 10s delay

This commit is contained in:
Mike Fährmann
2025-05-21 07:37:11 +02:00
parent 96f7f626d5
commit ee3fdb60e9

View File

@@ -90,9 +90,11 @@ class IdolcomplexExtractor(SankakuExtractor):
"user[password]": password,
"commit" : "Login",
}
self.sleep(10, "login")
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()
return {c.name: c.value for c in response.history[0].cookies}