IE Automation In Python
Join the DZone community and get the full member experience.Join For Free
I try to dump my data out of a website. But it block my python's urllib bot. I tried other pure python libray but without success. So, I try a quicker route using IE automation. For general automation you should try 'watsup'. For IE, there is PAMIE.
>>> from cPAMIE import PAMIE >>> ie = PAMIE() >>> ie.Navigate('www.google.com') # go to google >>> ie.SetTextBox('Python','q',0) # search for python >>> ie.ClickButton('btnG') # Go! >>> src = ie.pageText() # here it is >>> cookie = ie.GetCookie() # Ok, cookie is yummyPAMIE is actually aimed for more of the testing work. But in this case it serves me fine. http://pamie.sourceforge.net/
Opinions expressed by DZone contributors are their own.