[hitomi] follow multiple redirects

This commit is contained in:
Mike Fährmann
2020-02-20 18:22:13 +01:00
parent 6e759fe2f5
commit 5607dd3646

View File

@@ -67,7 +67,7 @@ class HitomiGalleryExtractor(GalleryExtractor):
response = self.request(url, fatal=False)
# 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]
if not url.startswith("http"):
url = text.urljoin(self.root, url)