Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallhaven getting tag name and apply account settings #6772

Closed
snwefly opened this issue Jan 5, 2025 · 3 comments
Closed

Wallhaven getting tag name and apply account settings #6772

snwefly opened this issue Jan 5, 2025 · 3 comments

Comments

@snwefly
Copy link

snwefly commented Jan 5, 2025

Example url https://wallhaven.cc/search?q=id:161039

  • How can i get the search text value (River Song) so i can use it in the directory naming scheme?
  • I added "promotional" to the block list on the wallhaven account and passed the cookies but gallery-dl ignoring the blacklists and download everything as if i am not logged in. How do i solve this?

Thanks


[cookies][info] Extracted 3250 cookies from Chromium
Keywords for directory names:
-----------------------------
category
  wallhaven
colors[N]
  0 #424153
  1 #000000
  2 #660000
  3 #999999
  4 #663300
date
  2016-07-16 01:08:05
favorites
  5
file_size
  2008591
file_type
  image/jpeg
height
  3062
id
  mpl6ky
purity
  sfw
ratio
  1.5
resolution
  4600x3062
search['q']
  id:161039
short_url
  https://whvn.cc/mpl6ky
source

subcategory
  search
thumbs['large']
  https://th.wallhaven.cc/lg/mp/mpl6ky.jpg
thumbs['original']
  https://th.wallhaven.cc/orig/mp/mpl6ky.jpg
thumbs['small']
  https://th.wallhaven.cc/small/mp/mpl6ky.jpg
url
  https://w.wallhaven.cc/full/mp/wallhaven-mpl6ky.jpg
views
  3659
wh_category
  general
width
  4600

Keywords for filenames and --filter:
------------------------------------
category
  wallhaven
colors[N]
  0 #424153
  1 #000000
  2 #660000
  3 #999999
  4 #663300
date
  2016-07-16 01:08:05
extension
  jpg
favorites
  5
file_size
  2008591
file_type
  image/jpeg
filename
  wallhaven-mpl6ky
height
  3062
id
  mpl6ky
purity
  sfw
ratio
  1.5
resolution
  4600x3062
search['q']
  id:161039
short_url
  https://whvn.cc/mpl6ky
source

subcategory
  search
thumbs['large']
  https://th.wallhaven.cc/lg/mp/mpl6ky.jpg
thumbs['original']
  https://th.wallhaven.cc/orig/mp/mpl6ky.jpg
thumbs['small']
  https://th.wallhaven.cc/small/mp/mpl6ky.jpg
url
  https://w.wallhaven.cc/full/mp/wallhaven-mpl6ky.jpg
views
  3659
wh_category
  general
width
  4600
@mikf
Copy link
Owner

mikf commented Jan 5, 2025

How can i get the search text value (River Song) so i can use it in the directory naming scheme?

You can access all raw search query parameter values via {search[...]}, for example

search['q']
  id:161039

but translating a tag ID to its actual name is not supported.

You could use -o keywords.search_tag="River Song" and use something like {search_tag|search[q]}, but you'd have to do that manually.

I added "promotional" to the block list on the wallhaven account and passed the cookies but gallery-dl ignoring the blacklists and download everything as if i am not logged in. How do i solve this?

wallhaven.api-key

@mikf
Copy link
Owner

mikf commented Jan 5, 2025

https://wallhaven.cc/help/api#search

When searching for an exact tag (id:##), providing the tag exists, the resolved tag name will be provided in the meta data.

I guess the resolved tag name should be added to the available metadata then.

@snwefly
Copy link
Author

snwefly commented Jan 6, 2025

https://wallhaven.cc/help/api#search

When searching for an exact tag (id:##), providing the tag exists, the resolved tag name will be provided in the meta data.

I guess the resolved tag name should be added to the available metadata then.

Thanks, this is what exactly i am looking for.

Is there anything i am do about the 2nd question, applying account blacklist to the downloaded files?

image

Nevermind, used the API key and everything working perfectly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants