laurengarcia / url-metadata

NPM module: Request a url and scrape the metadata from its HTML using Node.js or the browser.
https://www.npmjs.com/package/url-metadata
MIT License
166 stars 43 forks source link

Option to select which data we want #62

Closed cstayyab closed 10 months ago

cstayyab commented 10 months ago

Do you plan to add the option to select which data is needed?

This can also help in reduced processing when only some data (e.g. title, description, favicon) is required.

If it is in the plan, I can help implement it and send a PR.

laurengarcia commented 10 months ago

I don't think it makes sense if your intention is to improve performance. Because most of the latency comes from the network call over the internet, not the post-processing this module does after it. The post-processing is probably miniscule in comparison (I've not benchmarked it tho) but typically this is the case.

If you have some special use-case where this might make sense feel free to reopen and I'll reconsider if you fill in the details about what you're looking for.