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:
parent
e95b24f056
commit
06cbf5f9c4
@ -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
|
||||
==================
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user