gallery-dl icon indicating copy to clipboard operation
gallery-dl copied to clipboard

[Wallhaven] search results entries doesn't include tag.

Open gphg opened this issue 1 year ago • 0 comments

Unlike single page link wallpaper, search results link that download multiple wallpapers at once doesn't produce tags on JSON metadata.

Search link: https://wallhaven.cc/search?q=%40garett

# save the whole metadata into single JSON file
gallery-dl -j https://wallhaven.cc/search?q=%40garett > output.json

# JSON per entry, so I don't have to split it later
gallery-dl --no-download --write-metadata https://wallhaven.cc/search?q=%40garett

Single entry, pick randomly wallpaper page, for example this: https://wallhaven.cc/w/8ojrvo

# basically the same as above
gallery-dl -j https://wallhaven.cc/w/8ojrvo > 8ojrvo.data.json
gallery-dl --no-download --write-metadata https://wallhaven.cc/w/8ojrvo

The single entry is more detailed.

gphg avatar Aug 05 '22 02:08 gphg

Single entries use a different API endpoint with slightly different, more complete metadata.

I've added a metadata option for wallhaven (https://github.com/mikf/gallery-dl/commit/a69f198ac9fe48505cd1ad5296cefedc9ce7056c), that, when enabled, uses the single entry API endpoint for all wallpapers to provide tags metadata in all instances.

You might want to use a sleep-request value of at least 1 when using this option to not get throttled by 429 Too Many Requests errors.

mikf avatar Aug 10 '22 19:08 mikf