1 dispose verification code picture

'''

1 Verification code recognition technology

    python-tesseract

2 add_cookie()

'''

from selenium import webdriver

driver=webdriver.Firefox()

driver.get('http://www.xx.com')

#write username and password into  the cookie

driver.add_cookie({'name':'login_username','value':'username'})

driver.add_cookie({'name':'login_password','value':'password'})

#visit 'www.xx.com' again

driver.get('http://www.xx.com')

#...

driver.quit()

你可能感兴趣的:(1 dispose verification code picture)