如何获取网站的预览图像?

发布于 2024-08-13 11:46:24 字数 235 浏览 4 评论 0 原文

我知道甚至有一些网络资源可以让您预览网站“在特定浏览器中的外观”。

我只需要从任何浏览器查看图像。是否有可能在没有人参与的情况下获得该图像?是否可以不用系统编程,只通过纯java/python/asp.net的方式来获取呢?

UPD:http://browsershots.org/ 是所描述的网络资源的示例。

I know that there are even some web-resources exist which allow you to get a preview of a web-site 'as it looks in a certain browser'.

I only need view from any browser as an image. Is it possible to get that image without people involvement? Can I get it without system programming, just by means of pure java/python/asp.net?

UPD: http://browsershots.org/ is an example of described web-resources.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

吻安 2024-08-20 11:46:24

我所知道的工具可以做到这一点 - 实际上“只是”启动浏览器(当然以编程方式)并截取浏览器内容的屏幕截图并将其保存在图像中。

我认为无论你做什么,你都必须找到一种方法来做这样的事情。如果您通过系统编程引用操作系统 API 调用,那么我认为您会不走运。您也许可以获得可以为您执行此操作的第三方库,但该库将只是进行这些系统调用。

我现在看到其他人发布了可能对您也有用的地方的链接。如果不查看链接,这可能是最简单、最好的方法。

祝你好运

The tools I know of that does this - really "just" launches a browser (programatically of course) and takes a screenshot of the contents of the browser and saves this in an image.

I think no matter what you do, you will have to find a way of doing something like this. If you by system programming are refering to OS API calls, then I think you will be out of luck. You might be able to get a third party library that can do this for you, but then that library will simply be making those system calls instead.

I see now others have posted links to places that might prove themself useful to you as well. Without having looked at the links, that would probably be the easiest and best way to go.

Good luck

灼痛 2024-08-20 11:46:24

我相信您正在寻找的是 browsershots

I believe what you're looking for is browsershots

多情癖 2024-08-20 11:46:24

PageGlimpse 是一项服务
为开发者提供程序化
访问任何网页的缩略图。

它有基于REST协议的API和一些文档。

PageGlimpse is a service
providing developers with programatic
access to thumbnails of any web page.

It has API based on REST protocol and some documentation.

药祭#氼 2024-08-20 11:46:24

有一些网站可以让您执行此操作。

尝试 BrowserShots

There are some websites that let you do this.

Try BrowserShots

输什么也不输骨气 2024-08-20 11:46:24

有很多事情可以为你做这件事。例如,看看 stw

You have a lot of things doing this for you. Take a look at stw for instance.

梦罢 2024-08-20 11:46:24

如果您使用 .NET,则可以使用 DrawToBitmap 方法(示例)。然而,正如您在该示例页面的最后一条评论中看到的那样,它不适用于 Flash,而且对于使用复杂 Javascript 进行渲染的网站来说,它有点“不稳定”。

我认为你最好的选择是按照其他人所说的那样使用第三方缩略图提供商。我没有使用过它,但是 http://www.thumbshots.com/ 看起来不错。

If you're using .NET, it is possible to do this using the DrawToBitmap method of the WebBrowser control (example here). However, as you'll see by the last comment on that example page, it doesn't work with Flash, and it's a bit 'temperamental' with sites that use complex Javascript for rendering.

I think your best bet is to do as others have said and use a third party thumbnail provider. I haven't used it, but http://www.thumbshots.com/ looks good.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文