On Wed, Feb 2, 2011 at 7:20 AM, Tracubik <affdfsdfds...@b.com> wrote: > Hi all! > i'm writing a notification program and i'm quite new to python. > The program have to check every 5 minutes a particular website and alert > me when a particular sentence ("user online") is in the html. > i've thinked to use a text browser (lynx) to retrieve the html and parse > the output in python as a normal text file. > Do you have any better idea?
Assuming the website in question does not provide any useful APIs (sad), then a better approach is to use the urllib library in conjunction with lxml to parse the html in a sensible way (instead of just doing: if "foo" in s) cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list