```# 启动Chromedriver之前,为Chrome开启实验性功能参数excludeSwitches 逃避淘宝通过js代码的反爬机制
option = webdriver.ChromeOptions()
option.add_argument('--headless')
option.add_argument('--disable-gpu')
option.add_experimental_option('excludeSwitches', ['enable-automation'])
driver =webdriver.Chrome(options=option)
def Simulated_login():#模拟登录
driver.get('https://login.taobao.com/member/login.jhtml')
time.sleep(3)
# driver.maximize_window()#让窗口最大化
driver.implicitly_wait(5)
driver.find_element_by_id('J_Quick2Static').click()#点击密码登录,它id属性为J_Quick2Static找到并点击
time.sleep(random.random()) # 随机休眠0-1秒
Input_time(driver.find_element_by_id('TPL_username_1'),'13056199018ph') # 模拟点击输入账号框口,输入淘宝账号
time.sleep(random.random())# 随机休眠0-1秒
Input_time(driver.find_element_by_id('TPL_password_1'),'panhao123') # 模拟点击输入密码框口,输入淘宝密码
time.sleep(random.random())# 随机休眠0-1秒
driver.implicitly_wait(3)
if driver.find_element_by_id('nc_1_n1z'):#如果滑块验证出现了,找到它的位置,模拟鼠标滑动
Simulated_slider()
else:
Get_order()