问题
Google, Facebook and some others now have a preview link functionality where you can view a "screenshot" of say a website's home page. Are there any suggestions how I can achieve this?
Specifically I'd like to be able to grab a screenshot (a la iPhone screen shot) and make it available as an image such as a jpg or png.
I want to do this from python if possible.
回答1:
We're using the service Bluga, it's not too expansive and is pretty easy to implement. If you don't like that there are many other services available.
回答2:
For that you have to run a separate web browser and then save the image in the required format. You may try a headless web stack like phantomJS as a separate process and capture its out put as image.
There are several web services that provide this functionality like WebSnapr
回答3:
Jquery Preview may also help. It is really similar to Facebook's preview
来源:https://stackoverflow.com/questions/5778072/how-do-google-and-facebook-implement-and-create-the-preview-link-functionality