Closed peammm closed 3 years ago
Not possible. --filter
can only access the metadata provided by the extractor and that doesn't (and can't) have information about image dimensions for arbitrary URLs. It is sometimes available on specific, supported sites, but even that is not required to be the actual image width/height.
What you could do is write a script that reads image dimensions with identify
, ffprobe
, etc and deletes the files that don't fit your criteria, and run said script with gallery-dl's --exec
. It is, however, in general impossible to know an image's width/height before downloading it.
python3 version: 1.18.1 platform: Ubuntu 20.04 LTS
I try below command line but not working.
gallery-dl "r:https://xxx.net/373/373381" --filter "width >= 450"
gallery-dl "r:https://xxx.net/373/373381" --filter "image_width >= 450"
[directlink][error] FilterError: Evaluating filter expression failed (NameError: name 'image_width' is not defined)