• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can somebody help me with automaticaly get links from webpage and send it to a downloadprogram
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Re: Beep broken in 10.1.4?
  • Next by Date: Re: Beep broken in 10.1.4?
  • Previous by thread: Re: Removing (or picking) items from list 1 via list 2?
  • Next by thread: File Comments in OS9 and X
  • Index(es):
    • Date
    • Thread