VERY basic browser question

Tyler Eaves tyler at cg1.org
Thu Feb 20 16:19:26 EST 2003


Grant Ward Able unleashed the following on comp.lang.python:
> 
> 
> Hi there - can someone show me how to open a browser, click a button, enter
> data and then read text from the displayed webpage ?
> VERY, very new to Python........
> 
> TIA - Grant
> 
> 

Do you *really* need to open a browser, or do you actually want to get the
data from the webpage?

If the former, see the other reply, if the latter, something like this
should do the trick:

import urllib

urlobj = urllib.urlopen('http://example.com/something.cgi?var1=value1&var2=value2')

html = urlobj.read()



-- 
Tyler Eaves

Fundamental Python - Free Ebook!
http://cg1.org/pythontut.pdf




More information about the Python-list mailing list