标签:you cookies int form sel mail span 模拟登录 登录
selenium 模拟登录:
from selenium import webdriver import time driver = webdriver.Chrome() driver.get("https://www.douban.com/") driver.find_element_by_id("form_email").send_keys("your account") driver.find_element_by_id("form_password").send_keys("password") time.sleep(5) driver.find_element_by_class_name("bn-submit").click() cookies = {i["name"]:i["value"] for i in driver.get_cookies()} print(cookies) time.sleep(3) driver.close() driver.quit()
【Rollo的Python之路】Python 爬虫系统学习 (六) Selenium 模拟登录
标签:you cookies int form sel mail span 模拟登录 登录
原文地址:https://www.cnblogs.com/rollost/p/11104932.html