views:

255

answers:

6

Hi friends,

I want to download or just need to save the image file from a website using the javascript in pure coding itself.. Because i want to download nearly 1000 jpeg, so i would like to write a function to call and download those images.

URL is available, from that i want to download the specific image

Please guide regarding this..

+3  A: 
David Dorward
+3  A: 
scunliffe
A: 

There's the Firefox extension FlashGot which can download all images/audio etc. on a page in one go.

Stuart K
+1  A: 

Like David says, JS won't do it.

You either need a standalone download manager, or a browser plug-in variant. Most download managers are pretty good at downloading a sequence of files, for example files starting with "img0001.jpg", and ending with "img9999.jpg".

TFM
A: 

if you want to load images by code you should read this article about image preloading: http://www.webreference.com/programming/javascript/gr/column3/

it helped me to build a class to fetch images from URLs and get notifications when its done.

Amir
A: 

A scripting language could handle this pretty easily. Python in particular, with BeautifulSoup, would be fairly easy to work with in this case.

If you're looking, any language that can download pages and has a library available to parse HTML would work just fine, BS just happens to be the only one I have extensive knowledge of (and can therefore recommend).

nilamo