AppleScript version of Automator's Safari Actions

I am building an AppleScript studio app and really need some help on how to do applescript versions of Automator’s “Get Link URLs from Webpages” and “Get Image URLs from Webpage” actions. I would love to use curl or some other way to prevent the user from actually seeing the webpage.

Thanks for your help

Thanks,
LX-88

A combination of curl and grep would be a good start.