像facebook一样的Django url图像提取
有谁知道是否有一个可插拔的应用程序可以用来实现 Django 的 url 图像提取?
Does anybody know if there is a pluggable app that you can use to achieve url like image extraction for Django?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道是否有一个可插入的应用程序可以为您执行此操作,但您可能可以自己将其组合在一起。
据我所知,唯一能促进这一点的“标准”是 oEmbed (http://www.oembed.com/),它基本上是这样工作的:
除了上述之外,我认为 facebook 也做了什么(因为我查看了一些 twitter 和 fb 都可以使用的网站,但没有一个网站有任何我能看到的 oembed 支持),就是通过以下方式处理一个案例:案例依据。他们可能让开发人员浏览各种各样的网站并查看可用的元标记类型。例如,yfrog 有一堆元属性,可以直接告诉您正在显示的主图像的 url、所有者、图像附带的推文等。之后就是尽力猜测。这就是为什么当您尝试在 Facebook 上分享博客文章时,它通常会为您提供该博客文章附带的任何一张图像的选项,因为它不知道哪一张是主要图像。
I dont know if there is a pluggable app that will do this for you, but you can probably hack this together yourself.
The only 'standard' I know of that facilitates this is oEmbed (http://www.oembed.com/) which basically works this way:
other than the above, and what I think facebook does as well (since I took a look at a few sites that both twitter and fb would work with and none have any oembed support that I can see), is to work on a case by case basis. They probably had a developer go through a large variety of sites and look at the type of meta tags available. for example, yfrog has a bunch of meta properties that tell you the url directly to the main image being displayed, the owner, the tweet that went along with the image, etc. After that it's best effort guesswork. that's why when you try to share a blog post on facebook, it'll often give you the option of any one of the images that went with that blog post, because it doesn't know which one is the main one.