from DrissionPage import ChromiumPage
import ddddocr
import time
dp = ChromiumPage()
ocr = ddddocr.DdddOcr()
dp.get('https://hnzj.ghlearning.com/')
# if dp.ele('tag:button@@id=zhidao'):
# dp.ele('tag:button@@id=zhidao').click()
dp.ele('tag:div@@id=zhhome').click()
time.sleep(2)
dp.ele('tag:input@@id=username').input('41152219801291237')
dp.ele('tag:input@@id=pwd').input('12345678')
img_byte = dp.ele('tag:img@@id=checkCode').src()
yzm = ocr.classification(img_byte)
dp.ele('tag:input@@id=yzm').input(yzm).click()
dp.ele('tag:input@@id=button').click()