Re: Safari source code
Re: Safari source code
- Subject: Re: Safari source code
- From: Doug McNutt <email@hidden>
- Date: Sun, 20 Nov 2005 15:19:15 -0700
At 15:47 -0500 11/20/05, David Marshall wrote:
>On Sun, 20 Nov 2005 03:53:16 +0000, kai wrote:
>
>>Is that really the name of the Safari document, dor? Either way, I'm
>>afraid you can't coerce a Safari document to text. Instead, you'll
>>need to get the required document property (in this case, source).
>
>What about simply extracting the URL from the Safari page whose source is desired, and using URL Access Scripting to download the source (which is, after all, the same regardless of the browser being used)?
Yeah. I'd use curl as Emmanuel says but there are complications.
One reason for asking the current browser for the "text" is that it avoids a second download of the page that is already being viewed.
Another is not so simple. Selecting all or part and doing a copy / paste from a browser window to a text document can do strange things that are NOT the page source.
Sometimes, in the world of gratuitous JavaScript, the html source often doesn't contain the information that's desired. It may have been downloaded with a page-generated GET which won't show up unless copy and paste from the screen is used or a second curl GET is added.
"text of window 1" really ought to do the right thing after downloading all <src = >'s. I wonder. . .
The "show source" menu item in iCab displays the source in a text editor of your choice. In my case it opens an MPW window on this 8500 and it's ready to work with. <http://www.icab.de>.
--
--> Science is the business of discovering and codifying the rules and methods employed by the Intelligent Designer. Religions provide myths to mollify the anxiety experienced by those who choose not to participate. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden