VERY basic browser question

Grant Ward Able wardable at uk.ibm.com
Fri Feb 21 05:34:34 EST 2003


Thanks, Tyler.
This answers part of the question, but not all, unfortunately.
import urllib
urlobj = urllib.urlopen('http://example/index.html')
   AT THIS POINT, I NEED TO SIMULATE THE CLICKING OF A BUTTON, THEN TO ENTER
DATA ON THE NEXT DISPLAYED PAGE. THEN
   I NEED TO ENTER MORE DATA, CLICK ANOTHER BUTTON BEFORE I CAN GO ON TO DO
THE urlobj.read()

  This is really where I am completey stuck, the simulated clicking of
buttons & entering data. HELLLPPPPPPP!!!!!!!!! (Please !!???!!!)

 html = urlobj.read()




"Tyler Eaves" <tyler at cg1.org> wrote in message
news:yDb5a.47$pS1.25 at tornadotest1.news.pas.earthlink.net...
> 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