mikf / gallery-dl

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

How to ignore user/gallery urls? #5778

Open sockpuppetclock opened 6 days ago

sockpuppetclock commented 6 days ago

I'm running a browser script that passes selected URLs to gallery-dl. Sometimes I accidentally select a profile url instead of the post url and gallery-dl downloads the entire profile, which I do not want. Is there any internal distinction between galleries and posts that gallery-dl can be set to ignore?

mikf commented 5 days ago

Distinguishing between galleries and posts can be done via subcategories and setting options only for one of them. There is currently no option to completely ignore a certain type of URL, but you can tell gallery-dl to more or less immediately stop.

For example,

-o extractor.deviantart.gallery.image-filter="abort()"

will prevent DA galleries from being processed, but it'll still allow single posts to be downloaded.

You can find a URL's subcategory with -E/--extractor-info:

$ gallery-dl -E https://www.deviantart.com/shimoda7/gallery
Category / Subcategory
  "deviantart" / "gallery"