Write a python script that goes through the links on a page recursively
<p>I'm doing a project for my school in which I would like to compare scam mails. I found this website: <a href="http://www.419scam.org/emails/" rel="nofollow">http://www.419scam.org/emails/</a>
Now what I would like to do is to save every scam in apart documents then later on I can analyse them.
Here is my code so far:</p>

<pre><code>import BeautifulSoup, urllib2

address='http://www.419scam.org/emails/'
html = urllib2.urlopen(address).read()
f = open('test.txt', 'wb')
f.write(html)
f.close()
</code></pre>

<p>This saves me the whole html file in a text format, now I would like to strip the file and save the content of the html links to the scams:</p>

<pre><code>&lt;a href="2011-12/01/index.htm"&gt;01&lt;/a&gt; 
&lt;a href="2011-12/02/index.htm"&gt;02&lt;/a&gt; 
&lt;a href="2011-12/03/index.htm"&gt;03&lt;/a&gt;
</code></pre>

<p>etc.</p>

<p>If i get that, I would still need to go a step further and open save another href. Any idea how do I do it in one python code?</p>

<p>Thank you!</p>
