capture-website
capture-website copied to clipboard
Some random feedback points
- This module does exactly what I was looking for, I'm enjoying it
- there is a hidden option of options._browser that allows you to pass the browser instance in. This is incredibly useful for speeding up rendering since the cost of opening a browser instance is pretty substantial (about ~3s in my testing). I've hijacked this to greatly improve performance
- in relation to the above point, _keepAlive is also useful for speeding up future requests.
- you're
await
ing the page.close method which is wasted time for anyone just wanting the screenshot. My assumption as the consumer is that the page will close. And even if it didn't for some reason, I still want the screenshot returned to me.
Thanks for the nice work. I ended up making myself a really simple docker image that just takes the in all available options as JSON and returns an image.
I think you should take privacy in consideration when reusing browser instance over multiple requests to different websites. I'm not an expert, but couldn't this lead to security issues ? Maybe related to shared memory, cookies access, etc.