How do Google and Facebook implement and create the preview link functionality?

て烟熏妆下的殇ゞ 提交于 2019-12-21 05:47:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!