Closed greenbull-tpathier closed 2 years ago
Hello! Thank you for this pull request, I think this is a great idea. I can add some tests for this and publish it later this week,
This is now live in open-graph-scraper@4.10.0
. Thanks again!
Thanks for your prompt reply! <3
The request timeout would limit damages if we're passed the URL of a large file but we don't want to run out of memory if too much content gets transferred.
Test case:
Memory use for Node.JS will reach something like a Gigabyte. I think it's OK to avoid fetching more than 1MB of content.
I'm not sure about testing. We could create a local server throwing an error if too much content is consumed?