gallery-dl
gallery-dl copied to clipboard
[Wallhaven] search results entries doesn't include tag.
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.
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.