summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/pixnet.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-08-15 17:48:11 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2020-08-15 17:48:11 -0400
commit7cf59dc17c3607e096292462ed15d391be4e3dfd (patch)
tree50d2750e958f43271dc6cc5310211cf8f8bbd9d0 /gallery_dl/extractor/pixnet.py
parentba039cfb2e1ba2522ee0a0fa2a84a1a6579e4877 (diff)
New upstream version 1.14.4.upstream/1.14.4
Diffstat (limited to 'gallery_dl/extractor/pixnet.py')
-rw-r--r--gallery_dl/extractor/pixnet.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gallery_dl/extractor/pixnet.py b/gallery_dl/extractor/pixnet.py
index 9cada6b..d8ac9f6 100644
--- a/gallery_dl/extractor/pixnet.py
+++ b/gallery_dl/extractor/pixnet.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2016-2019 Mike Fährmann
+# Copyright 2016-2020 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -9,7 +9,7 @@
"""Extractors for https://www.pixnet.net/"""
from .common import Extractor, Message
-from .. import text
+from .. import text, exception
BASE_PATTERN = r"(?:https?://)?(?!www\.)([^.]+)\.pixnet.net"
@@ -53,6 +53,9 @@ class PixnetExtractor(Extractor):
yield from text.extract_iter(page, '<li id="', '</li>')
pnext = text.extract(page, 'class="nextBtn"', '>')[0]
+ if pnext is None and 'name="albumpass">' in page:
+ raise exception.StopExtraction(
+ "Album %s is password-protected.", self.item_id)
if "href" not in pnext:
return
url = self.root + text.extract(pnext, 'href="', '"')[0]
@@ -107,6 +110,9 @@ class PixnetSetExtractor(PixnetExtractor):
"url": "b3eb6431aea0bcf5003432a4a0f3a3232084fc13",
"keyword": "bf7004faa1cea18cf9bd856f0955a69be51b1ec6",
}),
+ ("https://sky92100.pixnet.net/album/set/17492544", {
+ "count": 0, # password-protected
+ }),
)
def items(self):