赞
踩
import requests
import json
import time
from selenium import webdriver
cookie1 = {
"apsid":"aaaaaaaa"
}
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
time.sleep(4)
#driver.find_element_by_id("aaa").click()
time.sleep(3)
driver.find_element_by_name("email").send_keys("11111122222")
driver.find_element_by_name("password").send_keys("eeeeeee")
driver.find_element_by_class_name("555555555").click()
time.sleep(3)
cookie = driver.get_cookies()
for i in cookie:
if i['name'] == 'apsid':
cookie1['apsid'] = i['value']
print(cookie1)
driver.close()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。