pip install selenium
__author__ = ‘admin‘ __date__ = 2017 / 11 / 3 from selenium import webdriver import time browser=webdriver.Chrome(executable_path="G:\ChromePortable_61.0.3141.7\chromedriver.exe") browser.get(‘https://www.zhihu.com/#signin‘) time.sleep(3) browser.find_element_by_css_selector(".qrcode-signin-cut-button").click() browser.find_element_by_css_selector(".view-signin input[name=‘account‘]").send_keys(‘17764587974‘) browser.find_element_by_css_selector(".view-signin input[name=‘password‘]").send_keys(‘lovejian520‘) browser.find_element_by_css_selector(".view-signin button.sign-button").click()
时间: 2024-10-09 00:21:36