如何创建URL提取器,如Facebook共享
问题描述:
我需要从url
中提取数据,如标题,描述和给定URL中的任何vedios映像
像Facebook共享按钮
i need to extract data from url like title , description ,and any vedios images in the given url like facebook share button
像这样:
http ://www.facebook.com/sharer.php?u = http://www.wired.com& t = Test
p>
答
Embed.ly 有一个很好的api为了这个目的。他们的api返回网站的oEmbed数据(如果可用) - 否则,它尝试提取页面的摘要,如Facebook。
Embed.ly has a nice api for exactly this purpose. Their api returns the site's oEmbed data if available - otherwise, it attempts to extract a summary of the page like Facebook.