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

Adding URL to metadata #1659

Closed
thatfuckingbird opened this issue Jun 29, 2021 · 2 comments
Closed

Adding URL to metadata #1659

thatfuckingbird opened this issue Jun 29, 2021 · 2 comments

Comments

@thatfuckingbird
Copy link
Contributor

Currently some extractors write post and file URLs to the metadata dict, while others do not.
It would be useful to always at least add the file URL to the metadata (post URL I'm not sure can be done universally, so maybe best left to the extractors). This should be easy to implement, since the metadata dict and the corresponding URL is yielded at the same time from extractors.

There is the question of what should be the name of the key in the metadata dict for this URL? (Can't be url or file_url as it could clash with some existing usage, so maybe gallerydl_file_url or something, not sure...).

What do you think, @mikf ?

mikf added a commit that referenced this issue Jul 15, 2021
@mikf
Copy link
Owner

mikf commented Jul 15, 2021

Took a while, but I've added a url-metadata option that let's you specify the name of the metadata field that should contain the download URL. For example "url-metadata": "gallerydl_file_url"would put them as gallerydl_file_url.

I do at some point want to redo the way extractors return their results and change the current yield Message.***, url, kwdict to just yielding a dict with metadata and URL combined, where a URL is always named url. That's why the results for some sites already have a url field.

@thatfuckingbird
Copy link
Contributor Author

Thank you! I wouldn't mind it always being url either, but for now this is great.

@mikf mikf mentioned this issue Jul 15, 2021
rautamiekka pushed a commit to rautamiekka/gallery-dl that referenced this issue Jul 17, 2021
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