raise NotFoundErrors for 404 responses in GalleryExtractors
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user