[hitomi] follow multiple redirects
This commit is contained in:
@@ -67,7 +67,7 @@ class HitomiGalleryExtractor(GalleryExtractor):
|
|||||||
response = self.request(url, fatal=False)
|
response = self.request(url, fatal=False)
|
||||||
|
|
||||||
# follow redirects
|
# follow redirects
|
||||||
if b"<title>Redirect</title>" in response.content:
|
while b"<title>Redirect</title>" in response.content:
|
||||||
url = text.extract(response.text, "href='", "'")[0]
|
url = text.extract(response.text, "href='", "'")[0]
|
||||||
if not url.startswith("http"):
|
if not url.startswith("http"):
|
||||||
url = text.urljoin(self.root, url)
|
url = text.urljoin(self.root, url)
|
||||||
|
|||||||
Reference in New Issue
Block a user