add common config category for boorus and foolslide

This commit is contained in:
Mike Fährmann
2017-08-29 22:42:48 +02:00
parent c0755a4d5e
commit be30fb2f98
4 changed files with 26 additions and 19 deletions

View File

@@ -175,6 +175,19 @@ class MangaExtractor(Extractor):
return []
class SharedConfigExtractor(Extractor):
basecategory = ""
def config(self, key, default=None, sentinel=object()):
value = Extractor.config(self, key, sentinel)
if value is sentinel:
cat, self.category = self.category, self.basecategory
value = Extractor.config(self, key, default)
self.category = cat
return value
# Reduce strictness of the expected magic string in cookiejar files.
# (This allows the use of Wget-generated cookiejars without modification)