Fetch data in IE8 using pywin32
Question: * * *

I've been trying to fetch data using pywin32(Internet Explorer) but can't find
anything good, Basically I want to fetch the data from the current source of
IE PAGE for example : if <http://whoer.net> is opened then I would like to
fetch the country or if the country is this then do this the "If" statement
work, but my main concept for this post is to get the data using
pywin32(Python2.5) or either print the data on the python console window or
so. Currently using:

    
    
    import pythoncom
    from win32com.client import *
    
    pythoncom.CoInitialize()
    ie = Dispatch("InternetExplorer.Application")
    ie.Navigate2("http://whoer.net")
    ie.Visible = True
    

Please Let me know how to search or find any data in that or print it.Thanks

EDIT : Note that I don't want to use any other modules/library(like
urllib/mechanize) I want it on IE.


Answer: I realize you don't want to use any external modules, however, you might have
a better time of it using something like [Selenium](http://seleniumhq.org/) to
deal with the content of the web page, or if you wanted to go lower level you
could even use the built-in
[urllib2](http://docs.python.org/library/urllib2.html).

If you insist on using just win32com, the topic is far too complex to give in
an answer. My recommendation is to look at the source code for
[PAMIE](http://pamie.sourceforge.net/). It's bit old, but it's a pure Python
module that does IE browser automation using (for the most part) just
win32com, and as far as I know the only other dependenciese are on built-in
modules. It should work just fine on Python 2.5, as well.

