applescript – Automator – Modify the results of Get Image URLs from Webpage

Spread the love


I'm trying to modify the results of a list of 30 items from “Get Image URLs on Webpage”.


For example:


What I would like to do is replace “236x” with “originals”.

The problem is that the closest I can get eliminates the ” “, and line breaks, which renders makes Downloading impossible.



Forgive me for being extremely noob. The code I'm using to make the change is:

on run {input}
    set input to replaceText("236x", "original", input as string)
end run

on replaceText(find, replace, textString)
    set prevTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to find
    set textString to text items of textString
    set AppleScript's text item delimiters to replace
    set textString to "" & textString
    set AppleScript's text item delimiters to prevTIDs
    return textString
end replaceText

I'm not sure of the right words to describe strings and paragraphs, truly noob, but I would guess that the preservation of each line in the paragraph might require something else entirely. Is it still a string if it has multiple lines?

Thanks in advance for any help can be given. I believe it's my final step to solving this.

Author: Subham

Leave a Reply

Your email address will not be published. Required fields are marked *