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: garbanzito <email@hidden>
- Date: Tue, 23 Apr 2002 12:10:28 -0600
at 2002 04 23, 16:56 +0200, they whom i call Bjorn Van Blanckenberg wrote:
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.
here's a crude script that will pull out all the hrefs in
the frontmost page displayed in Explorer. you'll have to
deal with relative links and parsing out the actual URL
and file name extension.
on get_links()
tell application "Internet Explorer"
set the_windows to ListWindows
set the_source to GetSource item 1 of the_windows
end tell
set the_offset to 1
set the_links to {}
repeat
set tag_start to offset of "href" in (text from the_offset to end
of the_source)
if tag_start is 0 then
exit repeat
end if
set tag_start to (the_offset + tag_start) - 1
set tag_end to (offset of ">" in (text from tag_start to end of
the_source)) - 2
set end of the_links to text from tag_start to (tag_start +
tag_end) of the_source
set the_offset to tag_start + tag_end + 1
end repeat
return the_links
end get_links
--
steve harley email@hidden
_______________________________________________
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.