[Tutor] Can Python monitor web browser content

Albert-Jan Roskam fomcl at yahoo.com
Sat Jan 26 11:35:28 CET 2013


---- Original Message -----

> From: Alan Gauld <alan.gauld at btinternet.com>
> To: tutor at python.org
> Cc: 
> Sent: Friday, January 25, 2013 8:54 PM
> Subject: Re: [Tutor] Can Python monitor web browser content
> 
> On 25/01/13 17:52, 3n2 Solutions wrote:
> 
>>  I was wondering if Python can monitor web browser content.
> 
> Browsers just display html text and Python can read html so
> yes you can do it by getting your program to emulate a browser.
> 
> Look at the standard library modules urllibm htmllib and htmlParser.
> Or for more adventurous parsing try the external module BeautifulSoup, it tends 
> to handle badly formed html better and is arguably easier to use than the 
> standard options..

I used the mechanize package before: http://pypi.python.org/pypi/mechanize/



More information about the Tutor mailing list