Re: Getting a link from a safari window
Re: Getting a link from a safari window
- Subject: Re: Getting a link from a safari window
- From: Tommy Bollman <email@hidden>
- Date: Sun, 23 May 2010 07:08:15 +0200
Den 22. mai 2010 kl. 23.03 skrev email@hidden:
>
> It would really help my script if I could get the link's URL first. This script will be visiting hundreds of pages, but if I can't determine if it's visited the URL already, it would be 1000s of pages.
>
> I've looked at the source and the URLs are generated by Java script or something, so their text does not actually appear in the source.
>
> Here's an illustration of what I'd like to do, with the part that doesn't work commented out.
>
> What I can do instead is click the link, read the URL from the window as it's opening and if it's one that's been visited then bale, but that's not terribly efficient.
100's of pages Even if you made the script work, what would happen if you hit a dead-link?
I don't know why you must use System Events to achieve your goals, which I really don't know the motivation behind.
But if there wasn't a very good reason to simulate the clicking on the links, I'd use curl or wget to access the links in the pages recursively to disk. That is if that is a viable solution for your problem.
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
The two most common things in the Universe are hydrogen and stupidity.
-- Harlan Ellison
_______________________________________________
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