Grabbing multiple webpage images with Automator

Discussion in 'Mac Programming' started by Jessica Lares, Feb 5, 2011.

  1. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #1
    This websites don't have RSS, so I can't just automate it in WordPress.

    Basically. I want to use Automator to grab a images from multiple URLs and rename them. However, I just need to grab the one within a DIV. Such as this:

    Code:
    <html>
    <body>
    <div="header"></div>
    <div="content"></div>
    <div="sidebar"></div>
    <div="footer"></div>
    </body>
    </html>
    Whatever is in <div="content"></div> is what I'm wanting.

    How would I do this? Is this even possible in Automator? I'm thinking about creating a Safari Extention to rip out the extra stuff within the CSS.
     
  2. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #2
    To what end? Why not just actually browse to the website?
     
  3. Jessica Lares thread starter macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #3
    Because there's at least 50. And not only is it tiring to open Safari 50 times everyday, my MBP cannot handle it since it's getting old.

    Basically, I want to have a script that opens up Safari, grabs the image between <div="content"></div>, like <div="content"><img src="website1.png"></div> and save it as website1.png. Then, repeat, and repeat, and repeat.

    It's just for a little project.
     

Share This Page