implement (sub)category-transfer between extractors (#41)

ImageFap- and all Manga-Extractors will transfer their (sub)category
values to other extractors instantiated by them, which will in turn
allow those to use options set for their parents.

Example:
ImagefapGalleryExtractors will use options set under
extractor.imagefap.user, if (and only if) they have been instantiated by
a ImagefapUserExtractor; and options from extractor.imagefap.gallery
otherwise.
This commit is contained in:
Mike Fährmann
2017-09-26 20:50:49 +02:00
parent 1ab4c7986f
commit 26a866e7d8
3 changed files with 23 additions and 7 deletions

View File

@@ -25,6 +25,7 @@ class Extractor():
category = ""
subcategory = ""
categorytransfer = False
directory_fmt = ["{category}"]
filename_fmt = "{filename}"
cookiedomain = ""
@@ -147,6 +148,7 @@ class AsynchronousExtractor(Extractor):
class MangaExtractor(Extractor):
subcategory = "manga"
categorytransfer = True
scheme = "http"
root = ""
reverse = True