Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add input URL to the metadata JSON? #3014

Answered by mikf
nateify asked this question in Q&A
Discussion options

Let's say for example I run the command gallery-dl https://danbooru.donmai.us/posts/xyz and my config enables writing metadata to JSON. I would like for "https://danbooru.donmai.us/posts/xyz" to end up somewhere in the JSON.

url-metadata is not suitable since it is a direct image link, for example for Danbooru it starts with https://cdn.donmai.us/original

Most importantly I would like it to be extractor agnostic. So do not want to manually write out per extractor postprocessor with https://danbooru.donmai.us/posts/{id} for example. I tried {extractor.url} and {url} like so but the final value is null:

 "postprocessors": [
 {
 "name": "metadata",
 "mode": "modify",
 "event": "init",
 "fields": {"extractor_url": "{url}"}
 },

With the above example my JSON has "extractor_url": null, in it

You must be logged in to vote

Most importantly I would like it to be extractor agnostic

That's not possible until I add another option similar to url-metadata, path-metadata, etc for this.

For Danbooru, you can use "fields": {"extractor_url": "https://danbooru.donmai.us/posts/{id!s}"} to get the post URL.

{extractor.url}

Only available in logging messages at the moment

Replies: 1 comment

Comment options

Most importantly I would like it to be extractor agnostic

That's not possible until I add another option similar to url-metadata, path-metadata, etc for this.

For Danbooru, you can use "fields": {"extractor_url": "https://danbooru.donmai.us/posts/{id!s}"} to get the post URL.

{extractor.url}

Only available in logging messages at the moment

You must be logged in to vote
0 replies
Answer selected by nateify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants

AltStyle によって変換されたページ (->オリジナル) /