[exhentai] detect CAPTCHAs during login (#5492)

pull/5516/head
Mike Fährmann 5 months ago
parent 068ccfe0b3
commit ddffeeaa7b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -95,7 +95,11 @@ class ExhentaiExtractor(Extractor):
self.cookies.clear()
response = self.request(url, method="POST", headers=headers, data=data)
if b"You are now logged in as:" not in response.content:
content = response.content
if b"You are now logged in as:" not in content:
if b"The captcha was not entered correctly" in content:
raise exception.AuthenticationError(
"CAPTCHA required. Use cookies instead.")
raise exception.AuthenticationError()
# collect more cookies

Loading…
Cancel
Save