Automator - Sequential URL processing?

Discussion in 'Mac Programming' started by island, May 6, 2008.

  1. island macrumors 6502

    island

    Joined:
    Feb 19, 2007
    Location:
    CT
    #1
    I'm looking for a way to have Automator do this...

    1. Go to a website, for example (www.aol.com/blah/G00000001)

    2. Save page as PDF

    3. Repeat with (www.aol.com/blah/G00000002), the next number.

    4. Stop at a certain number.

    I've been playing with Automator for a while and I can't seem to find a way to do it, any help would be awesome. Thanks.
     
  2. island thread starter macrumors 6502

    island

    Joined:
    Feb 19, 2007
    Location:
    CT
    #2
    From a little more research, I found that I might need some AppleScript in there along the lines of...

    setUrlBase to "http://mysite.com/que_call.cfg?order="

    Then I need to figure out how to make it start from WI01010000 through WI01019999 and then stop, saving each page as either HTML or a PDF.

    Any ideas would be appreciated, thanks!
     
  3. numero macrumors regular

    Joined:
    Jul 23, 2002
    Location:
    OR
    #3
    Is it just me or does it look like you are up to no good? It looks like you are trying to script your way through the orders of someone's web store. No help here for that.
     
  4. island thread starter macrumors 6502

    island

    Joined:
    Feb 19, 2007
    Location:
    CT
    #4
    It's to collect work orders in PDF form instead of me keeping them in paper form and wasting space. I'm a service technician for Dell and every morning there is at least 5 papers to print out with service call information.

    Don't be so quick to judge.
     
  5. PyroTurtle macrumors regular

    Joined:
    Jul 27, 2001
    Location:
    10 Minutes from Disneyland
    #5
    You could try just using curl in the terminal. cd to where you want to go and then run:

    curl -O "http://mysite.com/que_call.cfg?order=WI0101[0000-9999]"

    Just know that it will structure the number in the [] exactly how it's shows. so it will try 0001, then 0002, etc.

    Hope that helps, if it doesn't just ignore my ramblings.
     
  6. numero macrumors regular

    Joined:
    Jul 23, 2002
    Location:
    OR
    #6
    Your example showed 10,000 web pages to crawl.

    If you only have 5 or a few more you could just use the "save as PDF" from the print dialog.




     
  7. island thread starter macrumors 6502

    island

    Joined:
    Feb 19, 2007
    Location:
    CT
    #7
    Curl worked for me, churning away as we speak. Thanks for the help PyroTurtle, you rock!

    :D:D:D:D:D:D:D:D
     

Share This Page