diff options
| author | 2022-12-24 17:14:46 -0500 | |
|---|---|---|
| committer | 2022-12-24 17:14:46 -0500 | |
| commit | ebdfcd3cd3f76534a590ba08933ff7ea54813316 (patch) | |
| tree | 35db6003766dff695cf8a5aa24f47629b602b7c0 /gallery_dl/extractor/seiga.py | |
| parent | 3338dfce719c999467ffe08fd45663be8190057a (diff) | |
New upstream version 1.24.2.upstream/1.24.2
Diffstat (limited to 'gallery_dl/extractor/seiga.py')
| -rw-r--r-- | gallery_dl/extractor/seiga.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gallery_dl/extractor/seiga.py b/gallery_dl/extractor/seiga.py index 22c9487..7b8d2a3 100644 --- a/gallery_dl/extractor/seiga.py +++ b/gallery_dl/extractor/seiga.py @@ -44,7 +44,11 @@ class SeigaExtractor(Extractor): url = "{}/image/source/{}".format(self.root, image_id) response = self.request( url, method="HEAD", allow_redirects=False, notfound="image") - return response.headers["Location"].replace("/o/", "/priv/", 1) + location = response.headers["location"] + if "nicovideo.jp/login" in location: + raise exception.StopExtraction( + "HTTP redirect to login page (%s)", location.partition("?")[0]) + return location.replace("/o/", "/priv/", 1) class SeigaUserExtractor(SeigaExtractor): |
