Jump to content

get html source without rendering?


lsmall

This topic is 5380 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am currently running an automated script that scrapes data from an HTML based lab system in my hospital. I collect study data this way. I was wondering if there was a way to get the html source without having to render HTML page first, as this would, theoretically, cut my data capture time significantly. Right now I use a loop to detect when the page has loaded in the webviewer and then scrape the code using getlayoutobjectattribute and then parse the code. It works great, but I'm always looking for ways to shorten the data collection time and this is the major limiting factor in the script.

Any thoughts would be appreciated.

Thanks

Link to comment
Share on other sites

I believe you are correct. I have tried this in the past without much luck, probably because my XML knowledge is just not advanced enough, actually almost non-existent. I suppose I would need to create an XSL style sheet, but I really don't have much experience with this.

Link to comment
Share on other sites

There are many examples of XSLT stylesheets on these forums (both the Importing & Exporting section, and the XML/XSL section).

Another option is to use Applescript to run some shell commands. IIRC, a combination of curl and textutil can fetch the rendered text from a site.

Link to comment
Share on other sites

I am currently running an automated script that scrapes data from an HTML based lab system in my hospital. I collect study data this way. I was wondering if there was a way to get the html source without having to render HTML page first, as this would, theoretically, cut my data capture time significantly. Right now I use a loop to detect when the page has loaded in the webviewer and then scrape the code using getlayoutobjectattribute and then parse the code. It works great, but I'm always looking for ways to shorten the data collection time and this is the major limiting factor in the script.

Any thoughts would be appreciated.

Thanks

Perform applescript

Do shell script "curl http://www.filemaker.com"

copy result to cell "Source" of current record

Link to comment
Share on other sites

This topic is 5380 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.