# -*- coding: utf-8 -*-
#by:pako
#email:zealzpc@gmail.com
import win32com.client  
import time  
ie6=win32com.client.Dispatch("InternetExplorer.Application")  
ie6.Navigate("http://www.tudou.com/")  
ie6.Visible=1 
while ie6.Busy:  
  time.sleep(1)  
 
document=ie6.Document  
document.getElementById("email").value="username"  #tudou.com user name
document.getElementById("pwd").value="password"  #tudou.com user password
document.forms[1].submit()

time.sleep(4)
print 'have login'
document.getElementById("uInfo").getElementsByTagName("span")[0].firstChild.click()
print ' logout'

posted on 2013-03-28 17:38  一个人的天空@  阅读(295)  评论(0编辑  收藏  举报