On Thu, Sep 03, 2009 at 06:04:22PM -0400, Jamal Mazrui wrote:
-> I want to develop a web crawler with twill.  What might be the best way
-> to download non-HTML files while retaining state?  For example, a script
-> might log into a site and then search for particular .mp3 files there.
-> I want cookies and the Referer header to be handled correctly when
-> making a download request.  I have found twill examples that save
-> text/HTML but not binary files.

Hi Jamal,

try this:

---
import twill
b = twill.get_browser()
b.go('http://some/url/')  # <-- REPLACE WITH ACTUAL URL

data = b.result.get_page()
---

cheers,
--titus
-- 
C. Titus Brown, [email protected]

_______________________________________________
twill mailing list
[email protected]
http://lists.idyll.org/listinfo/twill

Reply via email to