Extracting Images with Mouse-Over

  • Thread starter Dr. Lince M. Lawrence
  • Start date
D

Dr. Lince M. Lawrence

Is there any method to extract both the images (with and without
mouse-over) from a web site.

Thanks,
Lince M Lawrence
 
M

McKirahan

Dr. Lince M. Lawrence said:
Is there any method to extract both the images (with and without
mouse-over) from a web site.

Thanks,
Lince M Lawrence

If you mean by right-clicking then no; well maybe, though I haven't tried
it: perhaps (but I doubt it) if you turn off JavaScript then the
"omouseover" won't be enabled.

However, you can always view the source identify the "on" and "off" image
naming convention (such as "image_on.gif" and "image_off.gif") then
right-click on the "on" image, view Properties, cut-and-paste the URL into
the address bar, then change the name to the "off" image.

Or just cut-and-pase the image name from the source to the address bar
keeping the prepended path.
 
D

Dr. Lince M. Lawrence

Mr.Randy has said an 'YES'. Shall I assume that, the explanation given
by Mr.McKirahan resembles your method.

If yes or no. I am aware of what Mr.McKirahan has said. I am looking
for some application which will help to extract the images. Either,
the entire images of a page, or selected ones.


Thanks,
Lince M Lawrence
 
M

McKirahan

Dr. Lince M. Lawrence said:
Mr.Randy has said an 'YES'. Shall I assume that, the explanation given
by Mr.McKirahan resembles your method.

If yes or no. I am aware of what Mr.McKirahan has said. I am looking
for some application which will help to extract the images. Either,
the entire images of a page, or selected ones.


Thanks,
Lince M Lawrence

This may be close to what you want.

Watch for word-wrap.

<html>
<head>
<title>images.htm</title>
</head>
<body>
<code>
<script type="text/javascript">
var aURL = "http://www.google.com/";
var sURL = prompt("Enter a URL:",aURL);
var oIEA = new ActiveXObject("InternetExplorer.Application");
oIEA.Navigate(sURL)
while(oIEA.readyState != 4) {}
var sBOR = " border='1'";
if (!confirm("Show images with a border?")) sBOR = "";
var oDIC = new ActiveXObject("Scripting.Dictionary");
var sEXT;
var sHTM = "";
var iIMG = 0;
var sIMG;
var xIMG = "";
var sLIN = "<hr align='left' width='700'>";
for (var j=0; j<oIEA.document.images.length; j++) {
sIMG = oIEA.document.images[j].src;
if (sIMG.indexOf("?") > 0) {
sIMG = sIMG.substr(0,sIMG.indexOf("?"));
}
sEXT = sIMG.substr(sIMG.length-4,sIMG.length).toLowerCase();
if (sIMG != "" && "|.gif|.jpg|.jpeg|.png|".indexOf(sEXT) > 0) {
if (!oDIC.Exists(sIMG)) {
oDIC.Add(sIMG, "");
iIMG++;
xIMG += iIMG + ". " + sIMG + "<br>";
sHTM += sLIN + iIMG + ". <img src='" + sIMG + "' alt='" +
sIMG + "'" + sBOR + ">";
}
}
}
document.write("<b>" + sURL + "</b>&nbsp;(" + iIMG + " images)" + sLIN);
document.write(xIMG + sHTM + sLIN);
if (confirm("View " + sURL + "?")) {
oIEA.visible = true;
}
</script>
</code>
</body>
</html>


However, a security warning is issued.

Note that it can't detect "onMouseOver" images;
so I guess it isn't your solution after all.

"onMouseOver" images can be loaded in two ways;
either by a direct reference to the image
or by calling a function to swap the image.

Also, the image name may be "constructed".
Thus, what you want may not be doable.

I hope to hear from others on this.
 
M

McKirahan

Dr. Lince M. Lawrence said:
Mr.Randy has said an 'YES'. Shall I assume that, the explanation given
by Mr.McKirahan resembles your method.

If yes or no. I am aware of what Mr.McKirahan has said. I am looking
for some application which will help to extract the images. Either,
the entire images of a page, or selected ones.


Thanks,
Lince M Lawrence

Another way is to copy them from cache.

IE works better as it doesn't change the image's name.

Depending on your OS, the images may be in a folder under:
C:\WINDOWS\Temporary Internet Files\Content.IE5\
 
R

Randy Webb

Dr. Lince M. Lawrence said:
Mr.Randy has said an 'YES'. Shall I assume that, the explanation given
by Mr.McKirahan resembles your method.

Not entirely but his approach works too. Getting the images for a web
page is trivially easy though.
If yes or no. I am aware of what Mr.McKirahan has said. I am looking
for some application which will help to extract the images. Either,
the entire images of a page, or selected ones.

As McKirahan pointed out, the cache is the simplest easiest way. Short
of that, you could write an app that would parse the document for common
image extensions, pull the names, build absolute paths, then create a
dynamic page of img tags with the images. Then its just a matter of
File>Save As in IE and it will save all the images. Might give me
something to tinker with this weekend.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top