How login & download file from remote web site? Passwords a problem?
calfdog at yahoo.com
calfdog at yahoo.com
Fri Jan 13 15:00:04 EST 2006
################################
# Quick and dirty script example
from win32com.client import DispatchEx
import time
def wait(ie):
while ie.Busy:
time.sleep(0.1)
while ie.Document.ReadyState != 'complete':
time.sleep(0.1)
#instaniate a new ie object so you can call it's methods and
properties...etc..
ie = DispatchEx('InternetExplorer.Application')
# You need to make it Visible
ie.Visible = 1
# Navigate to the page
ie.Navigate('mail.yahoo.com')
wait(ie) # important to wait for the doc to load
# Enter User info and submit the form since it uses submit
# If the button had a name attribute
# You could also use ie.Document.login_form.buttonName.Click
# ieObject.Document.FormName.TexboxName.value ="??"
ie.Document.login_form.username.value="MyName"
ie.Document.login_form.passwd.value="Mypasswd"
ie.Document.login_form.submit()
Enjoy
Rob M
http://pamie.sourceforge.net
More information about the Python-list
mailing list