Re: Can somebody help me with automaticaly get links from webpage and send it to a downloadprogram
Re: Can somebody help me with automaticaly get links from webpage and send it to a downloadprogram
- Subject: Re: Can somebody help me with automaticaly get links from webpage and send it to a downloadprogram
- From: "Daniel A. Shockley" <email@hidden>
- Date: Tue, 23 Apr 2002 13:51:34 -0400
From: Bjorn Van Blanckenberg <email@hidden>
Scan a webpage in explorer for all links and copy every link
with the extention wave, mp3 to a download program (igetter).
Than I can select in igetter with file I want to keep and start download.
I already start with applescript and open in explorer several URL's.
The following code returns every link on a page as a return-delimited list:
set javaScriptCode to "
numLinks=document.links.length;
linkList='';
for (i=0; i<numLinks; i++) {
linkList= linkList + document.links[i] + '\\r';
}
"
tell application "Internet Explorer"
-- Activate -- do not NEED to activate, unless you want to
watch something
set scriptResult to do script javaScriptCode
end tell
tell me to activate
scriptResult -- return delimited list of URLs
Then you could process them as you like. You can make it
tab-delimited or whatever by replacing the \\r part of the
javaScriptCode function. If you tinker with the rest, don't forget
the Javascript variable names are case-sensitive.
--
----
Daniel A. Shockley
email@hidden
email@hidden
http://www.danshockley.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.