From 32472d7d6c0ff10c419d4be3760e09e148465b58 Mon Sep 17 00:00:00 2001 From: cc1234 Date: Tue, 13 Feb 2024 18:34:04 +0000 Subject: [PATCH 1/2] Add support for multi channels --- gallery_dl/extractor/pornpics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery_dl/extractor/pornpics.py b/gallery_dl/extractor/pornpics.py index 4a6f0314..ca1f82fe 100644 --- a/gallery_dl/extractor/pornpics.py +++ b/gallery_dl/extractor/pornpics.py @@ -77,6 +77,7 @@ class PornpicsGalleryExtractor(PornpicsExtractor, GalleryExtractor): "slug" : extr("/galleries/", "/").rpartition("-")[0], "title" : text.unescape(extr("

", "<")), "channel" : extr('>Channel:', '').rpartition(">")[2], + "channels" : text.split_html(extr(">Channel: ", '')), "models" : text.split_html(extr( ">Models:", ' Date: Tue, 13 Feb 2024 23:48:46 +0100 Subject: [PATCH 2/2] [pornpics] update 'channel' extraction & add test change 'channel' to a list, since extracting both 'channel' and 'channels' does not really work with text.extract_from() --- gallery_dl/extractor/pornpics.py | 3 +-- test/results/pornpics.py | 37 +++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/pornpics.py b/gallery_dl/extractor/pornpics.py index ca1f82fe..83f30648 100644 --- a/gallery_dl/extractor/pornpics.py +++ b/gallery_dl/extractor/pornpics.py @@ -76,8 +76,7 @@ class PornpicsGalleryExtractor(PornpicsExtractor, GalleryExtractor): "gallery_id": text.parse_int(self.gallery_id), "slug" : extr("/galleries/", "/").rpartition("-")[0], "title" : text.unescape(extr("

", "<")), - "channel" : extr('>Channel:', '').rpartition(">")[2], - "channels" : text.split_html(extr(">Channel: ", '')), + "channel" : text.split_html(extr(">Channel: ", '')), "models" : text.split_html(extr( ">Models:", '