I am building a site that can take web page screen capture of the given URL, and then output a image URL. There have been so many services like this, but I am curious about how it works.
Initially, I guess I have to execute a browser on server-side, feed the URL given from client. The browser then load the URL, after that, wait for a few seconds for executing javascript because some pages cost time to perform its UI, like Trello. In the end, call certain API to capture that page.
I made up my mind to using the open source browser, Chromium. Even so, I still have doubt about if I am doing the right thing.
Questions
- Does my direction right?
- I am wondering how to execute a long-live Chromium browser on my server.
- Is there a shell I can control Chromium in command line?