Re: A better way to get web data?
Re: A better way to get web data?
- Subject: Re: A better way to get web data?
- From: Saline Erik <email@hidden>
- Date: Thu, 4 May 2006 07:52:15 -0700
You can use
do shell script "curl http://whateverwebsite.com"
Curl does not have to wait for Safari to open.
On May 4, 2006, at 7:34 AM, Monte Babington wrote:
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.
You can use
do shell script "curl http://whateverwebsite.com"
Curl does not have to wait for Safari to open.
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 (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40pen-tec.com
This email sent to email@hidden
_______________________________________________
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