Control webbrowser from Python script

Diez B. Roggisch deets at
Sat Oct 9 22:08:16 CEST 2010

Johny <python at> writes:

> On Oct 9, 5:17 pm, Tim Harig <user... at> wrote:
>> On 2010-10-09, Johny <pyt... at> wrote:
>> > Is it possible to control any webbrowser from Python ? For example to
>> > issue http POST and GET  command
>> The most reliable way to interact with a webserver is through the urllib
>> and httplib modules.  This is effective for 99% of cases.  I do understand
>> that some sites heavy in javascript can be difficult to figure out how to
>> make valid requests.  On win32 you can automate Internet Explorer through
>> its InternetExplorer.Application COM interface which is fully documented at
>> the MSDN site.  On other operating systems, Firefox can be accessed using
>> its XPCOM interface.
> Thanks ALL who replied.I wanted to use directly  httplib modul and I
> started with it.But webserver uses SSL communication.
> Of course, I can use https protocol but the communication between
> server and  client( browser) is so complicated that I was unable to
> simulate that with python script.So I think I could do that with
> webbrowser directly ( control webbrowser from a python script)

What has HTTPS to do with this? 

My tip for this problem: use FireBug and HTTP Live Headers to get an
idea what is really going on between Server & Browser.

Then model that with Python + urllib2.


More information about the Python-list mailing list