网页图片刮痧 - 处理CSS和透明度 [英] Web Image Scraping - Handling CSS and Transparency
问题描述
我在找一个库或工具时,我可能会建立一个Web图像刮刀。基本上只抓取DOM和具有特殊性能的拍摄。以下属性是特别重要的:
I'm looking for a library or utility upon which I may build a web image scraper. Basically just crawl the DOM and capture images with specific properties. The following attributes are of particular importance:
-
刮刀必须能够抓取CSS后,DOM和JavaScript已经被应用为crutial信息可通过这些元素被添加到页面。
The scraper must be able to crawl the DOM after CSS and javascript have been applied as crutial information may be added to the page via those elements.
有些图像包含一个透明层,因而被设计成特定的颜色或纹理背景前面进行观看。对于这样的形象,我想采取截图,但裁剪的只是图像被刮掉,使图像及其相关背景拍摄的。
Some images contain a transparency layer and thus are designed to be viewed in front of a specific color or textured background. For such images I would like to take a screenshot, but cropped to just the image being scraped so that the image is captured with its associated background.
会有人能指点我一个实用程序或库会议这一标准?
Would someone be able to direct me to a utility or library meetings this criteria?
推荐答案
您将需要能够获得图像的X / Y /宽/高并用它来裁剪截图。我不相信任何硒司机会给你的。我认为这是可能的iMacros的,但我不是100%这一点。
You would need to be able to get the image's x/y/width/height and use that to crop a screenshot. I don't believe any of the selenium drivers will give you that. I think it's possible with iMacros but I'm not 100% on that.
这篇关于网页图片刮痧 - 处理CSS和透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!