 |
 |
Automator Help Please
|
 |
|
 |
|
Grizzled Veteran
Join Date: May 2001
Location: Ca
Status:
Offline
|
|
Hello does anyone know how to Download the images from a website. Say a thread on Macnn that has images that are linked to the thread(Images that are hosted on another site, not the inline images) Right now I can only get automator to Download the gifs and what not that make up the fourm; the smilies, and other interface images that are all 4 KB from the current page in safari. I want the full res images from the link that you guys so offen provide. The are 2 options in automator using the Get Image URL's From Webpage action:
1. On these webpages
2. Linked from these webpages
Any thoughts on how this is done.
real
|
With some loud music + a friend to chat nearby you can get alot done. - but jezz, I'd avoid it if I had the choice---- If only real people came with Alpha Channels.......:)
AIM:xflaer
deinterlaced.com
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Location: London
Status:
Offline
|
|
The built-in automator action (from your description) sounds too blunt for what you need.
Try using a lower level of scripting.
I'd suggest using a mix of applescript and javascript (to extract the appropriate img elements from the source).
[php]
tell application "Safari"
set imageURLsList to {} as list
set frontDoc to the front document
-- the domain of the page - we only want external image links
set domainRoot to do JavaScript "document.domain" in frontDoc
-- the number of images in the front document
set numberOfImages to do JavaScript "document.images.length" in frontDoc
repeat with i from 0 to (numberOfImages - 1)
set the JSCode to "document.images[" & i & "].src"
-- try
set thisImageSRC to do JavaScript the JSCode in frontDoc
-- end try
if thisImageSRC does not contain domainRoot then
log ("external image - " & thisImageSRC)
copy thisImageSRC to end of imageURLsList
end if
end repeat
return imageURLsList
end tell
[/php]
n.b. - this will extract URLs of *any* external image from the page - so Sigs, ads etc. may well be included.
(Last edited by Diggory Laycock; May 4, 2005 at 07:58 AM.
(Reason:Formatting))
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Some dust-bowl of a planet
Status:
Offline
|
|
Originally Posted by real
Hello does anyone know how to Download the images from a website. Say a thread on Macnn that has images that are linked to the thread(Images that are hosted on another site, not the inline images) Right now I can only get automator to Download the gifs and what not that make up the fourm; the smilies, and other interface images that are all 4 KB from the current page in safari. I want the full res images from the link that you guys so offen provide. The are 2 options in automator using the Get Image URL's From Webpage action:
1. On these webpages
2. Linked from these webpages
Any thoughts on how this is done.
real
Image siphoning with Automator is a mixed bag right now; sometimes it works great, other not. It tends to have problems with script-driven sites, such as blogs and message boards.
You can embed an Applescript like the one above into a workflow; perhaps try this one as a starting point:
http://www.automatorworld.com/2005/0...rive/#comments
Note in the comments it needs editing, but basically hard-coded folder pointing in workflows is problematic when sharing them.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Location: London
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: May 2001
Location: Ca
Status:
Offline
|
|
Thanks for the help
How do I go about embeding the Apple script in the workflow?
Thanks again for the time
real
|
With some loud music + a friend to chat nearby you can get alot done. - but jezz, I'd avoid it if I had the choice---- If only real people came with Alpha Channels.......:)
AIM:xflaer
deinterlaced.com
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: May 2001
Location: Ca
Status:
Offline
|
|
Never mind I should look before posting. I see the "Run Applescript Action"
Diggory Laycock thanks for the Workflow Link.
real
|
With some loud music + a friend to chat nearby you can get alot done. - but jezz, I'd avoid it if I had the choice---- If only real people came with Alpha Channels.......:)
AIM:xflaer
deinterlaced.com
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: May 2001
Location: Ca
Status:
Offline
|
|
Thanks again Guys,
Still working on something i find usefull. Sometimes it works sometimes it doesn't.
|
With some loud music + a friend to chat nearby you can get alot done. - but jezz, I'd avoid it if I had the choice---- If only real people came with Alpha Channels.......:)
AIM:xflaer
deinterlaced.com
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|