[exhentai] improve image limits check (#1808)
Check for a 'text/html' Content-Type instead of the very specific 137 bytes Content-Length, which might change depending on compression or other factors.
This commit is contained in:
@@ -203,8 +203,8 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
|
|||||||
|
|
||||||
def _validate_response(response):
|
def _validate_response(response):
|
||||||
# declared inside 'items()' to be able to access 'data'
|
# declared inside 'items()' to be able to access 'data'
|
||||||
if not response.history and \
|
if not response.history and response.headers.get(
|
||||||
response.headers.get("content-length") == "137":
|
"content-type", "").startswith("text/html"):
|
||||||
self._report_limits(data)
|
self._report_limits(data)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user