[python-win32] Problem with Python win32com while loading facebookhomepage
Michel Claveau
mc at mclaveau.com
Sat Jul 25 17:51:23 CEST 2009
Hi!
The code below run OK for me. (Do not remove the sleep)
@+
--
Michel Claveau
# -*- coding: utf-8 -*-
import win32com.client
import time
ie = win32com.client.Dispatch('InternetExplorer.Application')
time.sleep(4)
ie.Visible=1
ie.Navigate('http://www.facebook.com')
time.sleep(4)
txt=ie.Document.Body.innerHTML
ie.Quit()
time.sleep(0.250)
del(ie)
print type(txt)
print
print txt.encode('cp850','replace')
More information about the python-win32
mailing list