[exhentai] fix blank page detection

This commit is contained in:
Mike Fährmann
2024-05-11 22:01:34 +02:00
parent 90b3741643
commit 3b6f306a8b

View File

@@ -50,7 +50,7 @@ class ExhentaiExtractor(Extractor):
def request(self, url, **kwargs):
response = Extractor.request(self, url, **kwargs)
if response.history and response.headers.get("Content-Length") == "0":
if "Cache-Control" not in response.headers and not response.content:
self.log.info("blank page")
raise exception.AuthorizationError()
return response