Imagescraper: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 1: Line 1:
<center>http://www.thedigitalmachine.com/images/googlescrape_sample.jpg</center>
This script combs google's image results for the link to the "full" image, rather than just the thumbnail.  As the original full image locations are determined, they are placed in the html result.  Once you submit a search, should start to get full images right away in the results.  Be careful, simple searches that result in a large number of hits can pull down LOTS of large images!
This script combs google's image results for the link to the "full" image, rather than just the thumbnail.  As the original full image locations are determined, they are placed in the html result.  Once you submit a search, should start to get full images right away in the results.  Be careful, simple searches that result in a large number of hits can pull down LOTS of large images!


Line 12: Line 15:


http://thedigitalmachine.com/imagescrape/
http://thedigitalmachine.com/imagescrape/
<center>http://www.thedigitalmachine.com/images/googlescrape_sample.jpg</center>

Revision as of 15:23, 29 March 2006

http://www.thedigitalmachine.com/images/googlescrape_sample.jpg


This script combs google's image results for the link to the "full" image, rather than just the thumbnail. As the original full image locations are determined, they are placed in the html result. Once you submit a search, should start to get full images right away in the results. Be careful, simple searches that result in a large number of hits can pull down LOTS of large images!

There's a secondary function as well. The resulting images are wrapped with HTML that will do an imagescrape of the site where the image is located, if you click on the image itself.

The script uses my favorite Perl module, WWW::Mechanize.

Someone asked me to release the perl code under the GPL. It's just a quick sloppy hack, so no promises, but here it is. One word of warning: it's pretty brittle, it's tied to the exact format of Google's image search and results pages. If they change, the script will need to be updated. Also of note: I got into this based on some article discussion somewhere - we stand on the shoulders of giants - keep on sharing!  :>

Imagescrape perl code

Try out Imagescraper here:

http://thedigitalmachine.com/imagescrape/