raise NotFoundErrors for 404 responses in GalleryExtractors
This commit is contained in:
@@ -302,7 +302,7 @@ class GalleryExtractor(Extractor):
|
|||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
self.login()
|
self.login()
|
||||||
page = self.request(self.gallery_url).text
|
page = self.request(self.gallery_url, notfound=self.subcategory).text
|
||||||
data = self.metadata(page)
|
data = self.metadata(page)
|
||||||
imgs = self.images(page)
|
imgs = self.images(page)
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import re
|
|||||||
class RedirectMixin():
|
class RedirectMixin():
|
||||||
"""Detect and handle redirects to CAPTCHA pages"""
|
"""Detect and handle redirects to CAPTCHA pages"""
|
||||||
|
|
||||||
def request(self, url):
|
def request(self, url, **kwargs):
|
||||||
while True:
|
while True:
|
||||||
response = Extractor.request(self, url)
|
response = Extractor.request(self, url, **kwargs)
|
||||||
if not response.history or "/AreYouHuman" not in response.url:
|
if not response.history or "/AreYouHuman" not in response.url:
|
||||||
return response
|
return response
|
||||||
if self.config("captcha", "stop") == "wait":
|
if self.config("captcha", "stop") == "wait":
|
||||||
|
|||||||
Reference in New Issue
Block a user