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

[Civitai] Image ID not available for all Civitai extractors. #6251

Closed
austblack88 opened this issue Sep 29, 2024 · 5 comments
Closed

[Civitai] Image ID not available for all Civitai extractors. #6251

austblack88 opened this issue Sep 29, 2024 · 5 comments

Comments

@austblack88
Copy link

I noticed that, when scraping images, the image id keyword isn't available for every subcategory in the Civitai extractor. For instance, it will be available for the "user-images" extractor:

...
hash
  U9C?Gs^*009G%L~Vs;4:00WV?bxa_3D*D%%M
height
  1024
**id**
  383346
meta
  None
...

but not for the "model" extractor (like when extracting images from a model's gallery).

Would it be feasible to include this in the other extractors?

@mikf
Copy link
Owner

mikf commented Sep 29, 2024

For "api": "rest" (default), the numeric ID should be available as filename. I should probably give it a proper id name, though.

@austblack88
Copy link
Author

austblack88 commented Sep 29, 2024

For "api": "rest" (default), the numeric ID should be available as filename. I should probably give it a proper id name, though.

I did try to fall back on the filename, but it's not always the same as the image id.

@mikf
Copy link
Owner

mikf commented Sep 30, 2024

With 987f6c3, all model images have a numeric {file[id]} value, and all regular images an {id} one; {file[id]|id} in general.

@mikf
Copy link
Owner

mikf commented Oct 1, 2024

Even without 987f6c3, you should be able to get the ID value with {file[id]|id|filename} and/or by using -o api=trpc.

@mikf mikf closed this as completed Oct 1, 2024
@austblack88
Copy link
Author

Works great, thank you!

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