如何从外部网站重新创建图像预览? [英] How to recreate an image preview from outside websites?

查看:160
本文介绍了如何从外部网站重新创建图像预览?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与Facebook的用户界面类似,我正在尝试从外部链接网站生成预览图像。因此,当用户键入他正在链接的URL时,UI将默认扫描该网站以获取img并刮擦预览拇指。

Similar to Facebook's UI, I am attempting at generating a preview image from an external linked website. So that when a user types in a url he is linking, the UI will by default, scan that site for an img and scrape a preview thumb.

是否有特定的这种技术的名称?或者有人能指出我学习这个的方向吗?

Is there a specific name for this technique? Or can anyone point me in the direction of learning this?

非常感谢!

推荐答案

它叫做刮擦。有一个名为scrAPI的库。

Its called scraping. There is a library called scrAPI.

这是一个代码示例 http://crunchlife.com/articles/2007/08/13/code-snippet-ruby-image-scraper

这篇关于如何从外部网站重新创建图像预览?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆