Re: Extract URLs using TIDs (how to?)
Re: Extract URLs using TIDs (how to?)
- Subject: Re: Extract URLs using TIDs (how to?)
- From: Charles Arthur <email@hidden>
- Date: Tue, 29 May 2001 11:16:21 +0100
Originally, I wrote..
>
> I'm trying to script the extraction of URLs from search results on a Web
>
> page. I've written a version that works with Tex-Edit, but I'd prefer to
>
> use ASTIDs - the speed difference is amazing.
At 10:48 am +1000 26/5/2001, asa wrote:
>
Did you know that Interarchy performs this function. It returns a list of
>
URLs from a page and it is easy to script.
Sorry to all for not having replied; my email has been fritzed on the
receiving side until now.
My point about wanting to do this with TIDs is speed. I have a working
version with Tex-Edit, but using any app to do this work requires all the
toing and froing of Appleevents between apps which is comparatively slow.
Doing it entirely with TIDs is just so, so much faster. I'd guess an order
of magnitude (I'll time it sometime soon.)
Also, using Interarchy would extract all sorts of URLs. There are two
faults with that approach for me.
1) the pages I'm looking at are festooned with URLs leading off to adverts,
other news stories, etc.
2) the getURL command (which I take it is the one you mean) looks much like
the download URL command of URL Access Scripting, which I'm using. All it
does is download that URL to a file, if I'm reading it correctly. Nothing
to be gained over URLAS, especially since it can't post form data, which
I'm using to produce pages that are the result of search queries.
As I said, the subroutine I twigged will work to extract URLs or stories or
any sort of text, providing you have a unique starting point for that text.
It doesn't even need a unique ending point, just some piece of text that
you want to be the end text. It's probably the first time I've really
impressed myself with a piece of programming.
best
Charles
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
Enter the photo competition!
http://www.ukclimbing.com/general/competition.html