Skip to content

Custom Site Support ‐ HowTo

HRXN edited this page Sep 15, 2024 · 2 revisions

gallery-dl has the ability to support any site that fits into one of its basic categories:

  • gelbooru_v01
  • gelbooru_v02
  • moebooru
  • lynxchan
  • philomena
  • foolfuuka
  • foolslide
  • mastodon
  • shopify

Several of these are already supported by default (see the bottom entries in supportedsites.md), but it is also possible to get it to recognize even more with the right config entries.

You can do this by editing your config file for your custom site.

Inside your extractor block, find the "base" category and add a new entry inside that with a name for the site. This will be used as the category name.

{  
    "extractor": {  
        "gelbooru_v01": {  
            "rozenmaidenbooru": {"root": "http://rm.booru.org"}  
        },  
      }  
}

In this example, we demonstrate a site of the "gelbooru_v01" type called "rozenmaidenbooru".

These entries must specify the root URL for this site, and can optionally set a custom pattern that gets used to match the site's domain. The pattern must not contain a capture group.

Here is a configuration example showing four sites of two different base categories:

{
    "extractor": {
        "gelbooru_v01": {
            "rozenmaidenbooru": {"root": "http://rm.booru.org"},
            "azureblade"      : {"root": "https://tab.booru.org"}
        },
        "shopify": {
            "hiutdenim": {"root": "https://hiutdenim.co.uk"},
            "ptfoods"  : {"root": "https://partakefoods.com",
                          "pattern": "(?:www\\.)?partakefoods\\.com"}
        }
    }
}