diff --git a/gallery_dl/extractor/poringa.py b/gallery_dl/extractor/poringa.py index e5e80d57..0149d060 100644 --- a/gallery_dl/extractor/poringa.py +++ b/gallery_dl/extractor/poringa.py @@ -17,8 +17,8 @@ BASE_PATTERN = r"(?:https?://)?(?:www\.)?poringa\.net" class PoringaExtractor(Extractor): category = "poringa" directory_fmt = ("{category}", "{user}", "{post_id}") - filename_fmt = "{post_id}_{title}_{filename}.{extension}" - archive_fmt = "{post_id}" + filename_fmt = "{post_id}_{title}_{num:>03}_{filename}.{extension}" + archive_fmt = "{post_id}_{num}" root = "http://www.poringa.net" def __init__(self, match): @@ -31,36 +31,45 @@ class PoringaExtractor(Extractor): url = "{}/posts/imagenes/{}".format(self.root, post_id) try: - page = self.request(url).text + response = self.request(url) except exception.HttpError as exc: self.log.warning( "Unable to fetch posts for '%s' (%s)", post_id, exc) continue + if "/registro-login?" in response.url: + self.log.warning("Private post '%s'", post_id) + continue + + page = response.text title, pos = text.extract( page, 'property="og:title" content="', '"') - pos = page.index('