I'm curious as to how DownThemAll does this. Do they use Javascript?
How can I get a list of all of the urls in a website using Javascript?
I'm curious as to how DownThemAll does this. Do they use Javascript?
How can I get a list of all of the urls in a website using Javascript?
Links: document.links (href)
Images: document.images (src)
Newer method: document.getElementsByTagName('img')
Bookmarklet:
javascript:var x=function{var imgs = document.getElementsByTagName('img');var t = "";for (var i=0, n=imgs.length;i<n;i++) t += '<br><a href="'+imgs[i].src+'"><img src="'+imgs[i].src+'" width="100"></a>'; var w=window.open('','_blank'); w.document.write(t); w.close();}; x();
Now you can save the new page and there will be a dir full images
var list=[];
var a=document.getElementsByTagName('img');
for (var i=0,l=a.length;i<l;i++)
{
if (/\.(jpg|gif|png|jpeg)$/im.test(a[i].getAttribute('src')))
{
list.push(a[i].getAttribute('src'));
}
}
This code would generate list of picture URL's which are used in <img>