[Tutor] screen scraping web-based email

Alan Gauld alan.gauld at btinternet.com
Wed Apr 18 21:27:41 CEST 2007


"James Cunningham" <jameshcunningham at uky.edu> wrote

> I'd like to write a daemon that logs into the text-based web client
> every so often, scrapes for new email, and uses smtplib to send that
> email to another email address.

Kent has pointed you at useful add-on modules.
Using the standard library consider the urllib2 library
(way better than urllib) and I believe the email module
rather than the smtlib is the current preferred route.

But I'd still recommend Beautiful Soup for parsing the HTML
the HTMLParser module can be used but its less reliable
and more work.

PS. I'm currently writing a tutorial topic on this very subject
and I'm trying to use the standard libs for the first time (since
I want my tutor to be based on the standard library) and it's
proving to be a "learning opportunity"!

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list