From 3f82852650e1106eee2aef5ad2a3bb1e2300373c Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 20 Jan 2024 02:03:02 +1100 Subject: [PATCH] [photos18] do pagination Photos18ListExtractor bails if there are no posts within a page, since (as of this commit), some pages might have improper navigation bars (for example, https://www.photos18.com/cat/2?page=75 still has a link to the next page despite the list of posts being far outside that range) --- gallery_dl/extractor/photos18.py | 90 +++++++++++++++++--------------- test/results/photos18.py | 8 +++ 2 files changed, 57 insertions(+), 41 deletions(-) diff --git a/gallery_dl/extractor/photos18.py b/gallery_dl/extractor/photos18.py index 043b702557..b562b13ec0 100644 --- a/gallery_dl/extractor/photos18.py +++ b/gallery_dl/extractor/photos18.py @@ -22,41 +22,6 @@ class Photos18Extractor(Extractor): archive_fmt = "{filename}" root = "https://www.photos18.com" - def items(self): - for post_id in self.posts(): - url = self.root + "/v/" + post_id - page = self.request(url).text - extr = text.extract_from(page) - - category_id = int(extr( - '