开发者

Download big images from http://images.google.ru

I'm t开发者_开发技巧rying to download images from http://images.google.com.

Its easy to download small images. But maybe someone know how to download big images that come from another site?

Greate thanks for the possible answer

best Vladimir


I'm assuming that you are scraping the image search results, and downloading the thumbnails, and what you require is to download the full images.

What you need to do to get the location of the original full size image is to download each individual results page from google, and parse out the link to the actual image. There location of the actual image is not in the main image search results page.

UPDATE: Actually, I was wrong. The location of the image is actually in the link from the orginal search results. You need to parse out the imgurl parameter from each of the links. They are in a format like this:

http://images.google.com/imgres?imgurl=http://www.hermann-uwe.de/files/images/dandelion2.preview.jpg&imgrefurl=http://www.hermann-uwe.de/taxonomy/term/785&usg=__OVQCdRc9fGLaJzsDVwCX5K2ijVs=&h=480&w=640&sz=30&hl=en&start=2&sig2=FT5NWbygGDAp5ee3I5Jh-A&tbnid=iwIM3LXyd4tEpM:&tbnh=103&tbnw=137&prev=/images%3Fq%3Ddandelion%26gbv%3D2%26hl%3Den&ei=5Hf9So7-NpD2-AabsaTqCg

Of course, you should bear in mind that using Google Image Search like this is against Google's Terms of Use (I believe), and that any images you retrieve might not be suitable for republishing without permission from their copyright holders.

On the other hand, Yahoo! actually encourages you to mess with their image search, and provides an API for you to do so. Y! image search seems pretty reasonable to me, so I recommend considering this approach.

Image Search Documentation for Yahoo! Search


Assuming your problem is 'speed', the limitation is in the Internet itself. Connections to Russian web servers where the images in question are hosted are limited in a number of ways compared to your domestic internet. This is something that can only be solved if you are able to find the same images on servers closer to you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜