<div class="gmail_quote">On Thu, Oct 1, 2009 at 6:33 PM,  <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 1 Oct, 09:28 am, <a href="mailto:nospam@nospam.com" target="_blank">nospam@nospam.com</a> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello<br>
<br>
        I recently asked how to pull companies' ID from an SQLite database,<br>
have multiple instances of a Python script download each company's web<br>
page from a remote server, eg. <a href="http://www.acme.com/company.php?id=1" target="_blank">www.acme.com/company.php?id=1</a>, and use<br>
regexes to extract some information from each page.<br>
<br>
I need to run multiple instances to save time, since each page takes<br>
about 10 seconds to be returned to the script/browser.<br>
<br>
Since I've never written a multi-threaded Python script before, to<br>
save time investigating, I was wondering if someone already had a<br>
script that downloads web pages and save some information into a<br>
database.<br>
</blockquote>
<br></div>
There's no need to use threads for this.  Have a look at Twisted:<br>
<br>
 <a href="http://twistedmatrix.com/trac/" target="_blank">http://twistedmatrix.com/trac/</a><br>
<br>
Here's an example of how to use the Twisted HTTP client:<br>
<br>
 <a href="http://twistedmatrix.com/projects/web/documentation/examples/getpage.py" target="_blank">http://twistedmatrix.com/projects/web/documentation/examples/getpage.py</a><br></blockquote><div><br>I don't think he was looking for a framework... Specifically a framework that you work on.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Jean-Paul<div><div></div><div class="h5"><br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>