A better way to get web data?
A better way to get web data?
- Subject: A better way to get web data?
- From: Monte Babington <email@hidden>
- Date: Thu, 04 May 2006 09:34:26 -0500
- Thread-topic: A better way to get web data?
Title: A better way to get web data?
I've got a script that retrieves text from a webpage’s HTML. I need to loop this function many times. I have two problems:
Problem 1:
Problem #1 is how unbelievably slow it is to do this through Safari. This requires that I wait for Safari to open a window, download the source, format it, and display it. Here's what I'm currently using:
-------------------------------
tell application "Safari"
launch
open location targetURL
repeat until exists source of document 1
end repeat
set pageFullyLoaded to false
repeat until pageFullyLoaded
set pageSourceCompare1 to get source of document 1
delay 20
set pageSourceCompare2 to get source of document 1
if pageSourceCompare1 = pageSourceCompare2 then set pageFullyLoaded to true
end repeat
...The code to parse the HTML follows...
-------------------------------
Is there a faster way to detect when the page has been fully downloaded, or better yet, a plug-in/suite/method that would allow me to skip having to wait for Safari to download and display the page.
Problem 2:
Some of the data will have to be looked up by submitting info to a cgi form on a website. How on earth do I go about that?
Monte Babington
Director of Production
--------------------------------------
Vat19 | Jumby Bay Studios
314.569.1771 x30
www.Vat19.com
www.JumbyBayStudios.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden