1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 20:22:36 +01:00

implement 'chapter-reverse' option (#149)

Setting it to `true` will start with the latest chapter instead of the
first one.
This commit is contained in:
Mike Fährmann 2019-01-07 18:22:33 +01:00
parent e95b24f056
commit 06cbf5f9c4
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 15 additions and 0 deletions

View File

@ -797,6 +797,18 @@ Description Categorize tags by their respective types
=========== =====
extractor.[manga-extractor].chapter-reverse
-------------------------------------------
=========== =====
Type ``bool``
Default ``false``
Description Reverse the order of chapter URLs extracted from manga pages.
* `true`: Start with the latest chapter
* `false`: Start with the first chapter
=========== =====
Downloader Options
==================

View File

@ -248,6 +248,9 @@ class MangaExtractor(Extractor):
Extractor.__init__(self)
self.url = url or self.scheme + "://" + match.group(1)
if self.config("chapter-reverse", False):
self.reverse = not self.reverse
def items(self):
page = self.request(self.url).text