新公司这边客服流动频繁,为防止密码泄露,写了个小脚本.可以让用户在不知道密码的情况下自动登录淘宝
主要代码:
#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
'''
Created on 2011-5-28
@author: fred <me@fengsage.com>
'''
'''
自动登录淘宝脚本
'''
def login_taobao(username, password):
from apps.PAM30 import PAMIE
ie = PAMIE()
ie.navigate("https://login.taobao.com/member/login.jhtml")
tmp_element = ie.findElement('input','name','loginType')
if tmp_element.getAttribute("value")=="4":
checkBox = ie.findElement('input', 'id', 'J_SafeLoginCheck')
ie.clickElement(checkBox)
if ie.textBoxExists('TPL_username') and ie.textBoxExists('TPL_password'):
&
......
taobao
python
More
Recent Comments