• 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
A better way to get web data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: A better way to get web data?
      • From: deivy petrescu <email@hidden>
    • Re: A better way to get web data?
      • From: Doug McNutt <email@hidden>
    • Re: A better way to get web data?
      • From: Rob Stott <email@hidden>
    • Re: A better way to get web data?
      • From: Saline Erik <email@hidden>
  • Prev by Date: Re: Re script
  • Next by Date: Re: A better way to get web data?
  • Previous by thread: Re: Re script
  • Next by thread: Re: A better way to get web data?
  • Index(es):
    • Date
    • Thread