1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +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
## Unreleased
## 1.8.5 - 2019-06-01
### Additions
- Support for

View File

@ -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

View File

@ -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"