Re: parsing online data ?
Re: parsing online data ?
- Subject: Re: parsing online data ?
- From: Jim Underwood <email@hidden>
- Date: Tue, 13 Mar 2018 07:00:00 +0000
- Thread-topic: parsing online data ?
I've done a fair amount of web scraping over the last couple of years, and I
don't think I'd ever call XPath my "friend". LOL
It's more like a precision tool (maybe like RegEx) that is powerful, but hard
to learn.
If you already have the web page open, then, IMO, it is more efficient to use a
few lines of JavaScript to extract the text rather than re-downloading the
entire source of the web page to use in ASObjC XML. There are also many, many
online examples of using JavaScript for web scraping, and almost none using
ASObjC. AFAIK, Shane has been kind enough to provide the few examples I know
of.
It is also much easier (for me) to develop and test JavaScript using tools like
the Chrome Dev Tools Console and debugger than using XPath with ASObjC. I like
and use ASObjC for many things, but for web scraping it is not my first tool of
choice.
YMMV.
Best Regards,
Jim Underwood
aka JMichaelTX
From: AppleScript-Users
<applescript-users-bounces+jmichael=email@hidden<mailto:applescript-users-bounces+jmichael=email@hidden>>
on behalf of Shane Stanley
<email@hidden<mailto:email@hidden>>
Date: Tue, Mar 13, 2018 at 1:30 AM
To: "ASUL (AppleScript)"
<email@hidden<mailto:email@hidden>>
Subject: Re: parsing online data ?
If you get the content into XML, XPath is your friend.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden