Skip to content

[GalleryDLInfo] gallery-dl downloaded metadata scraper - #2742

Open
spaceyuck wants to merge 2 commits into
stashapp:masterfrom
spaceyuck:GalleryDLInfo
Open

[GalleryDLInfo] gallery-dl downloaded metadata scraper#2742
spaceyuck wants to merge 2 commits into
stashapp:masterfrom
spaceyuck:GalleryDLInfo

Conversation

@spaceyuck

@spaceyuck spaceyuck commented May 9, 2026

Copy link
Copy Markdown
Contributor

Scraper type(s)

  • performerByName
  • performerByFragment
  • performerByURL
  • sceneByName
  • sceneByQueryFragment
  • sceneByFragment
  • sceneByURL
  • groupByURL
  • galleryByFragment
  • galleryByURL
  • imageByFragment
  • imageByURL

Examples to test

Includes a test suite using example data based on a few different structures encountered in the wild

Short description

gallery-dl has a few interesting options (--write-info-json and --write-metadata), that produce per gallery and per file JSON metadata files while downloading. This scraper implements processing these files.

These could be very helpful, if the source is for whatever reason no longer scrapable with existing scrapers (cloudflare, API ban, content removed by uploader, ...).

There seems to be somewhat of a consensus on the structure, but there are a lot of site-specific differences, so it's once again a best effort approach, which may or may not work well for any of the hundreds of sites supported by gallery-dl.

closes #2240

This scraper includes unit tests and test data, right now these are placed right besides the scraper, I don't know if they should maybe go somewhere else.

Comment thread scrapers/GalleryDLInfo/gallerydl_info.py Outdated
@spaceyuck

Copy link
Copy Markdown
Contributor Author

OK, reworked some stuff, no more site-specific code paths or references.

But as already said, it's only as generic as far as there is a consensus between implementations on their side. Some fields have a few different guesses of what they might be named, but it remains a bit of whack-a-mole.

@DogmaDragon

Copy link
Copy Markdown
Contributor

I don't think including test and test data serves any purpose for end users.

@spaceyuck

Copy link
Copy Markdown
Contributor Author

I don't think including test and test data serves any purpose for end users.

I have moved the tests and test data into a sub-folder for the scraper under a new top folder scraper-tests, this should keep all tests code and test data away from the actual scrapers while still mirroring the directory structure, so associations remain clear.

@spaceyuck
spaceyuck requested a review from feederbox826 May 15, 2026 06:49
@Maista6969
Maista6969 force-pushed the master branch 2 times, most recently from acb310b to cd51adb Compare July 9, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gallery.dl integration / metadata with stashapp

3 participants