Re: Performing actions on a series of links
Re: Performing actions on a series of links
- Subject: Re: Performing actions on a series of links
- From: Christopher Nebel <email@hidden>
- Date: Mon, 24 Dec 2007 19:45:21 -0800
On Dec 24, 2007, at 11:25 AM, Emil Hedaya wrote:
OK, perhaps this is out of the scope of Automator's capabilities and
more suited to a shell script of some sort, but here is what I want
to do. I have a single web page that contains a list of
hyperlinks. Specifying that as the input, I want Automator to
perform this action with EACH link in the list:
1) Open the link
2) Look for a URL that matches some criteria in the resulting page
3) Append that URL (if found) to a file of some sort. Otherwise,
just leave the page.
This will build a list of links, fewer in number, that is of direct
usability to me.
Is this possible?
Right up to the "append" part. If that's literally what you meant --
append to an existing file -- then you'll have to do a bit of
scripting. Otherwise, it's pretty straightforward:
Get Specified URLs (your original page) >
Get Link URLs from Webpages (gets all the links on the original page) >
Get Link URLs from Webpages (gets all the links from *those* links) >
Filter URLs (as desired) >
New Text File / New TextEdit Document
There isn't an action that directly lets you append stuff to an
existing file. However, you can make one easily enough with Run Shell
Script:
shell: /bin/sh
pass input: to stdin
script: cat >> ~/Desktop/myfile.txt (or wherever)
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden