raise NotFoundErrors for 404 responses in GalleryExtractors

This commit is contained in:
Mike Fährmann
2019-12-13 18:42:04 +01:00
parent a4dd8b3dab
commit d3e44e899d
2 changed files with 3 additions and 3 deletions

View File

@@ -302,7 +302,7 @@ class GalleryExtractor(Extractor):
def items(self):
self.login()
page = self.request(self.gallery_url).text
page = self.request(self.gallery_url, notfound=self.subcategory).text
data = self.metadata(page)
imgs = self.images(page)

View File

@@ -19,9 +19,9 @@ import re
class RedirectMixin():
"""Detect and handle redirects to CAPTCHA pages"""
def request(self, url):
def request(self, url, **kwargs):
while True:
response = Extractor.request(self, url)
response = Extractor.request(self, url, **kwargs)
if not response.history or "/AreYouHuman" not in response.url:
return response
if self.config("captcha", "stop") == "wait":