<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: How can I automate this web browsing task?</title>
	<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task/</link>
	<description>Comments on Ask MetaFilter post How can I automate this web browsing task?</description>
	<pubDate>Fri, 29 Aug 2008 12:59:05 -0800</pubDate>
	<lastBuildDate>Fri, 29 Aug 2008 12:59:05 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: How can I automate this web browsing task?</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task</link>	
		<description>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. &lt;br /&gt;&lt;br /&gt; Every day, I need to log on to a website. This part is important, as without logging in, I can&apos;t do the actions that I want to do.&lt;br&gt;
&lt;br&gt;
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:&lt;br&gt;
&lt;br&gt;
1. By programmatically loading one page, retrieving all links that say &apos;Add&apos;, and loading the pages referenced by those links&lt;br&gt;
2. I can manually add the links to a list (or a Firefox bookmark, which is how I&apos;ve been semi-automating this)&lt;br&gt;
&lt;br&gt;
Once that&apos;s done, the script (or whatever) can log out.&lt;br&gt;
&lt;br&gt;
I&apos;m good with computers. I program for a living and am familiar with a bunch of scripting languages. The reason I&apos;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&apos;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.&lt;br&gt;
&lt;br&gt;
I don&apos;t mind manually finding the links on my own time. I just don&apos;t want to be obligated to be online at EXACTLY the time that their catalogue refreshes.&lt;br&gt;
&lt;br&gt;
Here&apos;s what I&apos;ve come up with so far:&lt;br&gt;
&lt;br&gt;
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&lt;br&gt;
&lt;br&gt;
I would like to stress that (1) would be ideal.&lt;br&gt;
&lt;br&gt;
2. Use www:mechanize to retrieve the Add links, and then follow them using threaded requests.&lt;br&gt;
&lt;br&gt;
Any other suggestions, or any tools built specifically for this task?&lt;br&gt;
&lt;br&gt;
Thanks!</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.100456</guid>
		<pubDate>Fri, 29 Aug 2008 12:49:22 -0800</pubDate>
		<dc:creator>mebibyte</dc:creator>
		
			<category>website</category>
		
			<category>automation</category>
		
			<category>automate</category>
		
			<category>repetitive</category>
		
	</item> <item>
		<title>By: blind.wombat</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460227</link>	
		<description>You might be able to do this with &lt;a href=&quot;http://www.autoitscript.com/autoit3/&quot;&gt;autoit&lt;/a&gt; if you can&apos;t find a way to do it all with browser extensions/addons.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460227</guid>
		<pubDate>Fri, 29 Aug 2008 12:59:05 -0800</pubDate>
		<dc:creator>blind.wombat</dc:creator>
	</item><item>
		<title>By: mebibyte</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460233</link>	
		<description>Sorry! That reminds me. I work with Mac and Linux computers only. No VMs, no wine.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460233</guid>
		<pubDate>Fri, 29 Aug 2008 13:10:43 -0800</pubDate>
		<dc:creator>mebibyte</dc:creator>
	</item><item>
		<title>By: knowles</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460235</link>	
		<description>Can&apos;t you do this with Applescript, Automator, or a cronjob?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460235</guid>
		<pubDate>Fri, 29 Aug 2008 13:12:06 -0800</pubDate>
		<dc:creator>knowles</dc:creator>
	</item><item>
		<title>By: XMLicious</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460236</link>	
		<description>&lt;a href=&quot;http://www.pushtotest.com/&quot;&gt;PushToTest&lt;/a&gt; is a Java-based (runs on Linux and Windows, I don&apos;t know about OSX) web application testing framework that can be used to script things like this.  It&apos;s designed so that the scripts can be packaged up and run automatically by a Unix daemon, I believe.&lt;br&gt;
&lt;br&gt;
(But actually, you ought to be able to write something to do this from scratch in any language you&apos;re familiar with, if you feel up to the challenge.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460236</guid>
		<pubDate>Fri, 29 Aug 2008 13:13:19 -0800</pubDate>
		<dc:creator>XMLicious</dc:creator>
	</item><item>
		<title>By: pdxpatzer</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460247</link>	
		<description>you can use any of the following ...&lt;br&gt;
&lt;br&gt;
cURL&lt;br&gt;
http://curl.haxx.se/&lt;br&gt;
&lt;br&gt;
Watir&lt;br&gt;
http://wtr.rubyforge.org/&lt;br&gt;
&lt;br&gt;
Selenium&lt;br&gt;
http://selenium.openqa.org/&lt;br&gt;
&lt;br&gt;
same examples of web client programming can be found here (the content is old but it should still be accurate)&lt;br&gt;
http://oreilly.com/openbook/webclient/&lt;br&gt;
&lt;br&gt;
hope this helps</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460247</guid>
		<pubDate>Fri, 29 Aug 2008 13:24:11 -0800</pubDate>
		<dc:creator>pdxpatzer</dc:creator>
	</item><item>
		<title>By: adamrice</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460248</link>	
		<description>&lt;a href=&quot;http://www.iopus.com/imacros/firefox/&quot;&gt;iMacros for Firefox&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.urbanhonking.com/ideasfordozens/archives/2008/03/automating_fire.html&quot;&gt;Automating Firefox&lt;/a&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460248</guid>
		<pubDate>Fri, 29 Aug 2008 13:25:24 -0800</pubDate>
		<dc:creator>adamrice</dc:creator>
	</item><item>
		<title>By: XMLicious</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460251</link>	
		<description>Whoa!  Selenium looks sweet.  Thanks for posting that, pdxpatzer.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460251</guid>
		<pubDate>Fri, 29 Aug 2008 13:27:58 -0800</pubDate>
		<dc:creator>XMLicious</dc:creator>
	</item><item>
		<title>By: austinetsu</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460252</link>	
		<description>I&apos;ll 2nd &lt;a href=&quot;http://wtr.rubyforge.org/&quot;&gt;Watir&lt;/a&gt;.  It was created to do automated testing of web apps with Internet Explorer.  However we&apos;ve been using it at work to script automated tasks on the web</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460252</guid>
		<pubDate>Fri, 29 Aug 2008 13:28:30 -0800</pubDate>
		<dc:creator>austinetsu</dc:creator>
	</item><item>
		<title>By: hooray</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460260</link>	
		<description>You can do this with Applescript and Safari.  There&apos;s a &quot;do javascript&quot; command in the Safari library, that will help you with a lot of this stuff --- filling in forms, submitting, grabbing links.  I find &lt;a href=&quot;http://www.macosxhints.com/article.php?story=20080205190647941&quot;&gt;macosxhints&lt;/a&gt; to be a useful resource for this kind of thing.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460260</guid>
		<pubDate>Fri, 29 Aug 2008 13:38:16 -0800</pubDate>
		<dc:creator>hooray</dc:creator>
	</item><item>
		<title>By: rjt</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460265</link>	
		<description>Untested, but something like this should work...&lt;br&gt;
&lt;br&gt;
&lt;code&gt;&lt;br&gt;
cd $HOME/tmp/&lt;br&gt;
&lt;br&gt;
wget --save-cookies cookies.txt --post-data &apos;username=foo&amp;amp;password=bar&apos; http://www.example.com/login&lt;br&gt;
&lt;br&gt;
wget --load-cookies cookies.txt --recursive --max-depth 0 --delete-after http://www.example.com/your/page&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Note that the second wget will follow &lt;i&gt;all&lt;/i&gt; links on the page, not just the ones you want. This may or may not be a problem. (Also the --domains switch might help here.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460265</guid>
		<pubDate>Fri, 29 Aug 2008 13:47:31 -0800</pubDate>
		<dc:creator>rjt</dc:creator>
	</item><item>
		<title>By: rjt</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460271</link>	
		<description>sorry, that should be &lt;tt&gt;--max-depth 1&lt;/tt&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460271</guid>
		<pubDate>Fri, 29 Aug 2008 13:57:02 -0800</pubDate>
		<dc:creator>rjt</dc:creator>
	</item><item>
		<title>By: wongcorgi</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460303</link>	
		<description>Seconding a curl or wget script on a cron job</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460303</guid>
		<pubDate>Fri, 29 Aug 2008 14:42:29 -0800</pubDate>
		<dc:creator>wongcorgi</dc:creator>
	</item><item>
		<title>By: PueExMachina</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460400</link>	
		<description>Ruby&apos;s &lt;a href=&quot;http://mechanize.rubyforge.org&quot;&gt;WWW:Mechanize&lt;/a&gt; is well documented and easy to use. I don&apos;t see why you couldn&apos;t write a short script to do what you want and run it from cron.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460400</guid>
		<pubDate>Fri, 29 Aug 2008 17:08:48 -0800</pubDate>
		<dc:creator>PueExMachina</dc:creator>
	</item><item>
		<title>By: Happy Dave</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460408</link>	
		<description>I&apos;ve done something similar to this using a combination of &lt;a href=&quot;http://www.macupdate.com/info.php/id/20766&quot;&gt;Aurora&lt;/a&gt; and Automator.  Basically, each morning, Aurora wakes the mac, plays a song from an iTunes playlist, then opens safari, loads the page for NPR&apos;s The writer&apos;s Almanac (I&apos;m in the UK, can&apos;t get it on the radio), finds the link on the page that has &apos;play&apos; in it and clicks it.&lt;br&gt;
&lt;br&gt;
This works because as well as hooking into iTunes, Aurora has a field that you can drag and drop any file or application to in order to launch it at a certain time.  And you can save Automator scripts as Application files.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460408</guid>
		<pubDate>Fri, 29 Aug 2008 17:21:15 -0800</pubDate>
		<dc:creator>Happy Dave</dc:creator>
	</item><item>
		<title>By: flabdablet</title>
		<link>http://ask.metafilter.com/100456/How-can-I-automate-this-web-browsing-task#1460650</link>	
		<description>I&apos;d use wget, bash and cron.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.100456-1460650</guid>
		<pubDate>Sat, 30 Aug 2008 05:50:55 -0800</pubDate>
		<dc:creator>flabdablet</dc:creator>
	</item>
	</channel>
</rss>
