From b2a354f0d241caf3786d9a56af82369adc041333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 24 Jul 2025 08:23:23 +0200 Subject: [PATCH] [urlgalleries] do not strip query parameters (#7888) fixes regression introduced in fc06243b897611441f342c2021522be7ec663b6f --- gallery_dl/extractor/urlgalleries.py | 2 +- test/results/urlgalleries.py | 31 ++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/gallery_dl/extractor/urlgalleries.py b/gallery_dl/extractor/urlgalleries.py index aed7c54b..4369ac63 100644 --- a/gallery_dl/extractor/urlgalleries.py +++ b/gallery_dl/extractor/urlgalleries.py @@ -42,7 +42,7 @@ class UrlgalleriesGalleryExtractor(GalleryExtractor): for data["num"], img in enumerate(imgs, 1): page = self.request(root + img).text url = text.extr(page, "window.location.href = '", "'") - yield Message.Queue, url.partition("?")[0], data + yield Message.Queue, url, data def metadata(self, page): extr = text.extract_from(page) diff --git a/test/results/urlgalleries.py b/test/results/urlgalleries.py index 9e0997f9..e057beef 100644 --- a/test/results/urlgalleries.py +++ b/test/results/urlgalleries.py @@ -14,9 +14,9 @@ __tests__ = ( "#class" : urlgalleries.UrlgalleriesGalleryExtractor, "#range" : "1-3", "#results" : ( - "https://fappic.com/x207mqkn2463/4gq1yv.jpg", - "https://fappic.com/q684ua2rp0j9/4gq1xv.jpg", - "https://fappic.com/8vf3n8fgz9po/4gq1ya.jpg", + "https://fappic.com/x207mqkn2463/4gq1yv.jpg?gname=Clarice+window+8", + "https://fappic.com/q684ua2rp0j9/4gq1xv.jpg?gname=Clarice+window+8", + "https://fappic.com/8vf3n8fgz9po/4gq1ya.jpg?gname=Clarice+window+8", ), "blog" : "photos2q", @@ -33,9 +33,9 @@ __tests__ = ( "#class" : urlgalleries.UrlgalleriesGalleryExtractor, "#range" : "1-3", "#results" : ( - "https://fappic.com/x207mqkn2463/4gq1yv.jpg", - "https://fappic.com/q684ua2rp0j9/4gq1xv.jpg", - "https://fappic.com/8vf3n8fgz9po/4gq1ya.jpg", + "https://fappic.com/x207mqkn2463/4gq1yv.jpg?gname=Clarice+window+8", + "https://fappic.com/q684ua2rp0j9/4gq1xv.jpg?gname=Clarice+window+8", + "https://fappic.com/8vf3n8fgz9po/4gq1ya.jpg?gname=Clarice+window+8", ), "blog" : "photos2q", @@ -65,4 +65,23 @@ __tests__ = ( "title" : "Angelika - Rustic Charm - AmourAngels 2016-09-27 7722lhrmys", }, +{ + "#url" : "https://urlgalleries.net/b/xarchivesx/porn-gallery-6722560/caroline", + "#comment" : "image host URLs with query parameters (#7888)", + "#class" : urlgalleries.UrlgalleriesGalleryExtractor, + "#range" : "1-3", + "#results" : ( + "http://img272.imagevenue.com/img.php?image=63353_qedf2jsd4j_123_376lo.jpg", + "http://img220.imagevenue.com/img.php?image=63140_hl2kkhv0n4_123_621lo.jpg", + "http://img217.imagevenue.com/img.php?image=63140_z2edqlkpkz_123_986lo.jpg", + ), + + "blog" : "The Archives Blog", + "count" : 141, + "date" : "dt:2016-06-11 00:00:00", + "gallery_id": "6722560", + "num" : range(1, 3), + "title" : "Caroline q5c75eeybn", +}, + )