解决验证码问题

#! /usr/local/bin/python3
# coding:utf-8

from selenium import webdriver
from time import sleep

options = webdriver.ChromeOptions()
options.add_argument('--kiosk')
driver = webdriver.Chrome(chrome_options=options)
driver.get('http://www.baidu.com')

a = driver.find_element_by_id("su")
a.screenshot("/root/code.png")
sleep(5)
driver.quit()

去百度注册调取api可准确识别

posted @ 2019-03-07 16:35  Corey0606  阅读(220)  评论(0编辑  收藏  举报