From 173add69358b960d790287f6c26751325a17d4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 10 Jul 2018 11:30:17 +0200 Subject: [PATCH] [nijie] fix artist_id extraction view_popup.php pages for older images or dojins either have the artist_id value at a different place or not at all. --- gallery_dl/extractor/nijie.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gallery_dl/extractor/nijie.py b/gallery_dl/extractor/nijie.py index 667fc479..524e9d5b 100644 --- a/gallery_dl/extractor/nijie.py +++ b/gallery_dl/extractor/nijie.py @@ -21,6 +21,7 @@ class NijieExtractor(AsynchronousExtractor): archive_fmt = "{image_id}_{index}" cookiedomain = "nijie.info" root = "https://nijie.info" + view_url = "https://nijie.info/view.php?id=" popup_url = "https://nijie.info/view_popup.php?id=" def __init__(self, match=None): @@ -51,7 +52,7 @@ class NijieExtractor(AsynchronousExtractor): def get_image_data(self, image_id): """Get URL and metadata for images specified by 'image_id'""" - page = self.request(self.popup_url + image_id).text + page = self.request(self.view_url + image_id).text return self.extract_image_data(page, image_id) def extract_image_data(self, page, image_id): @@ -60,14 +61,20 @@ class NijieExtractor(AsynchronousExtractor): page, '