From 95b4a53b9c66906a5df39496216977523439018a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 2 Jun 2019 22:12:21 +0200 Subject: [PATCH] [keenspot] improve pagination (#223) The old code would skip the last comic page for some series. --- CHANGELOG.md | 2 ++ gallery_dl/extractor/keenspot.py | 5 ++++- gallery_dl/version.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc4efd15..040da0db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## Unreleased + ## 1.8.5 - 2019-06-01 ### Additions - Support for diff --git a/gallery_dl/extractor/keenspot.py b/gallery_dl/extractor/keenspot.py index 8ddce24c..0f4d1c08 100644 --- a/gallery_dl/extractor/keenspot.py +++ b/gallery_dl/extractor/keenspot.py @@ -48,6 +48,7 @@ class KeenspotComicExtractor(Extractor): self.comic = match.group(1).lower() self.path = match.group(2) self.root = "http://" + self.comic + ".keenspot.com" + self._needle = "" self._image = 'class="ksc"' self._next = self._next_needle @@ -61,8 +62,10 @@ class KeenspotComicExtractor(Extractor): if self.path: url = self.root + self.path + prev = None ilen = len(self._image) - while url and url != "/": + while url and url != prev: + prev = url page = self.request(text.urljoin(self.root, url)).text pos = 0 diff --git a/gallery_dl/version.py b/gallery_dl/version.py index bcdff5e5..9ba8d303 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.8.5" +__version__ = "1.8.6-dev"