1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 04:32:51 +01:00

[keenspot] improve pagination (#223)

The old code would skip the last comic page for some series.
This commit is contained in:
Mike Fährmann 2019-06-02 22:12:21 +02:00
parent 12c965d547
commit 95b4a53b9c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Changelog # Changelog
## Unreleased
## 1.8.5 - 2019-06-01 ## 1.8.5 - 2019-06-01
### Additions ### Additions
- Support for - Support for

View File

@ -48,6 +48,7 @@ class KeenspotComicExtractor(Extractor):
self.comic = match.group(1).lower() self.comic = match.group(1).lower()
self.path = match.group(2) self.path = match.group(2)
self.root = "http://" + self.comic + ".keenspot.com" self.root = "http://" + self.comic + ".keenspot.com"
self._needle = "" self._needle = ""
self._image = 'class="ksc"' self._image = 'class="ksc"'
self._next = self._next_needle self._next = self._next_needle
@ -61,8 +62,10 @@ class KeenspotComicExtractor(Extractor):
if self.path: if self.path:
url = self.root + self.path url = self.root + self.path
prev = None
ilen = len(self._image) ilen = len(self._image)
while url and url != "/": while url and url != prev:
prev = url
page = self.request(text.urljoin(self.root, url)).text page = self.request(text.urljoin(self.root, url)).text
pos = 0 pos = 0

View File

@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation. # published by the Free Software Foundation.
__version__ = "1.8.5" __version__ = "1.8.6-dev"