imputnet / cobalt

best way to save what you love
https://cobalt.tools
GNU Affero General Public License v3.0
17.43k stars 1.43k forks source link

Provide optional extracted data in the API response #900

Closed m-ehsan closed 2 weeks ago

m-ehsan commented 2 weeks ago

describe the feature you'd like to see

Is it appropriate to provide some extra service-specific data related to the media that has been extracted in the API response? Data items like tweet text, Instagram post caption and ...

In my opinion those kind of data are still public and are tightly related to the media file that the user has requested. In addition they are already accessible in the fetched data. Having an optional field in the API response can satisfy needs of more users.

I suggest adding the field below to tunnel, redirect & picker response types: key type values
misc object optional extra data related to the requested media

And of course this misc field would be service-dependent and dynamic, leaving room for future changes in the returned items. Also there will be no assurance for it to contain the same set of items every time, it may even contain no items at all. It just should return any relevant item that is possible.

example value of misc field for Instagram service:

{
    "caption_text": "..."
}

Other accessible fields that might be relevant: comment_count, like_count, play_count, taken_at

What do you think? Is this a reasonable feature for this project?

additional context

No response

wukko commented 2 weeks ago

cobalt is not some kind of api wrapper, it’s a downloader

plus, this info is useless unless you use the api for scraping

dumbmoron commented 2 weeks ago

from CONTRIBUTING.md:

adding features or support for services

... the cobalt api is built to assist people only with downloading freely accessible content. other functionality, such as: ...

  • scraping unrelated information & exposing it outside of file metadata

will not be reviewed or merged.

cobalt is a media downloader tool, not a webscraping tool, so this is wholly out of scope