mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

apply --filter to the .conf file (download videos or images only) #6371

Closed dokax closed 1 day ago

dokax commented 1 day ago

this filter: https://github.com/mikf/gallery-dl/issues/5388

How to apply --filter to the .conf file so that each extractor has a different filter? Let some extractors only download images and some only download videos.

mikf commented 1 day ago
{
    "extractor": {
        "danbooru": {
            "image-filter": "extension in ('mp4', 'mkv', 'm4v','avi')"
        },
        "gelbooru": {
            "image-filter": "extension in ('jpg', 'png', 'gif', 'webp')"
        },
        "other category": {
            "image-filter": "..."
        }
    }
}

You can get the category values with gallery-dl -E "URL"