鍍金池/ 問答/數(shù)據(jù)分析&挖掘  Python/ IT 桔子爬蟲

IT 桔子爬蟲

https://www.itjuzi.com/user/l...

iT 橘子 如何登陸上去

回答
編輯回答
毀憶
from selenium import webdriver
import time
with open('../password.txt', 'r') as r:
    username, password = r.readline().split(',')

chrome = webdriver.Chrome()
chrome.get('https://www.itjuzi.com/user/login')
time.sleep(2)
chrome.find_element_by_xpath('//*[@id="create_account_email"]').send_keys(username)
chrome.find_element_by_xpath('//*[@id="create_account_password"]').send_keys(password)
chrome.find_element_by_xpath('//*[@id="login_btn"]').click()

最簡單的登陸方式

2017年8月26日 16:11