ImageGrabber

I know there are lots of utilities out there for nicking images from web sites, but I thought I’d have a go at writing my own.

This is really even simpler than TypeScript, and so I had a go at doing it in JavaScript first. (TypeScript could have easily been done in JavaScript too, thinking about it…)

Here’s my first attempt – this really is mind-bogglingly simple. It doesn’t gather images from web pages, but only works on web sites where they give their images sequential numbers – amazingly quite a lot of sites seem to do this.

The advantage this system has over site-mining programs, is that this can find images that never made it onto a finished web page.

So copy and paste the HTML below into a text document, save it locally and open it in your web-broswer (I’m not daft enough to host this on my own web space!)

You need to enter the image path – try something like

http://www.maxim-magazine.co.uk/picture_library/dir_9/maxim_pic_

- then the first image number (say 4500) and the last (4999 if you like), the image suffix (.jpg) and off you go…

————-

<html>
<head>
<title>image grabber</title>
</head>

<body>

<script language=”javascript”>

imagepath = prompt(“Enter image path”, “http://”);

start = prompt(“Enter 1st image number”, “1″);

stop = prompt(“Enter last image number”, “23″);

suffix = prompt(“Enter image suffix”, “.jpg”);

for (i=start; i<=stop; i++)
{
document.write (“<img src=”+imagepath+i+suffix+”><br />image “+i+”<hr>”)
}

</script>

</body>
</html>

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>