allow filtering '--list-extractors' results
with blacklist/whitelist syntax, e.g. --list-extractors pixiv --list-extractors pixiv:user pixiv:work --list-extractors :search
This commit is contained in:
@@ -760,8 +760,9 @@ def build_extractor_filter(categories, negate=True, special=None):
|
||||
if catsub:
|
||||
def test(extr):
|
||||
for category, subcategory in catsub:
|
||||
if category in (extr.category, extr.basecategory) and \
|
||||
subcategory == extr.subcategory:
|
||||
if subcategory == extr.subcategory and (
|
||||
category == extr.category or
|
||||
category == extr.basecategory):
|
||||
return not negate
|
||||
return negate
|
||||
tests.append(test)
|
||||
|
||||
Reference in New Issue
Block a user