How can I automate this web browsing task?
August 29, 2008 12:49 PM
Subscribe
Please help me automate a repetitive task (log in to website, then after successful login, load some pages, then log out), in a way that can be scheduled so that it runs at two different hours each day.
Every day, I need to log on to a website. This part is important, as without logging in, I can't do the actions that I want to do.
After logging in, I need to load several specific pages. The pages that need to be loaded can be determined in one of two ways:
1. By programmatically loading one page, retrieving all links that say 'Add', and loading the pages referenced by those links
2. I can manually add the links to a list (or a Firefox bookmark, which is how I've been semi-automating this)
Once that's done, the script (or whatever) can log out.
I'm good with computers. I program for a living and am familiar with a bunch of scripting languages. The reason I'm asking for this is, where I currently work, I am expected to load a page twice a day (*exactly* when a catalogue refreshes, it's time-sensitive) and Add a list of products (it uses HTTP GET so I just need to follow links). It really only takes a couple of minutes, but I hate switching from one task to another and back.
I don't mind manually finding the links on my own time. I just don't want to be obligated to be online at EXACTLY the time that their catalogue refreshes.
Here's what I've come up with so far:
1. (ideal) manually adding the links to a firefox bookmark, then using some sort of firefox extension/applescript or something to use my saved login/password to log in, then load the bookmarks at a time I specify
I would like to stress that (1) would be ideal.
2. Use www:mechanize to retrieve the Add links, and then follow them using threaded requests.
Any other suggestions, or any tools built specifically for this task?
Thanks!
posted by mebibyte to computers & internet (15 comments total)
9 users marked this as a favorite
posted by blind.wombat at 12:59 PM on August 29, 2008