diff --git a/gallery_dl/extractor/nijie.py b/gallery_dl/extractor/nijie.py index 6ee6931a..3839ad37 100644 --- a/gallery_dl/extractor/nijie.py +++ b/gallery_dl/extractor/nijie.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015-2017 Mike Fährmann +# Copyright 2015-2018 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 @@ -35,6 +35,8 @@ class NijieExtractor(AsynchronousExtractor): for image_id in images: for image_url, image_data in self.get_image_data(image_id): image_data.update(data) + if not image_data["extension"]: + image_data["extension"] = "jpg" yield Message.Url, image_url, image_data def get_job_metadata(self): @@ -138,7 +140,9 @@ class NijieImageExtractor(NijieExtractor): if 300 <= response.status_code < 400: raise exception.NotFoundError("image") self.page = response.text - self.artist_id = text.extract(self.page, "/nijie_picture/sp/", "_")[0] + self.artist_id = text.extract( + self.page, "/nijie_picture/sp/", "_")[0] or text.extract( + self.page, "/dojin_main/", "_")[0] return NijieExtractor.get_job_metadata(self) def get_image_ids(self): diff --git a/gallery_dl/extractor/powermanga.py b/gallery_dl/extractor/powermanga.py index 850bbbdd..a936238e 100644 --- a/gallery_dl/extractor/powermanga.py +++ b/gallery_dl/extractor/powermanga.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015-2017 Mike Fährmann +# Copyright 2015-2018 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 @@ -26,6 +26,16 @@ class PowermangaMangaExtractor(foolslide.FoolslideMangaExtractor): category = "powermanga" pattern = foolslide.manga_pattern(r"read\.powermanga\.org") test = [("https://read.powermanga.org/series/one_piece/", { - "url": "e5e9a64c14ca51a170e14c4b711aaa88fdf7a7aa", - "keyword": "1245ab2a730f9129001a4589b1d8615a17dc4a7b", + "count": ">= 1", + "keyword": { + "chapter": int, + "chapter_minor": str, + "chapter_string": str, + "group": "PowerManga", + "lang": "en", + "language": "English", + "manga": "One Piece", + "title": str, + "volume": int, + }, })] diff --git a/test/test_extractors.py b/test/test_extractors.py index bc422cc6..67a9d04a 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2015-2017 Mike Fährmann +# Copyright 2015-2018 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 @@ -20,6 +20,7 @@ SKIP = { # temporary issues "chronos", "coreimg", + "hosturimage", "yeet", }