self_example/Spider/Chapter08_验证码的识别/使用打码平台识别验证码/demo2_点选验证码.py

26 lines
635 B
Python

#-*- encoding:utf-8 -*-
'''
@Author : dingjiawen
@Date : 2023/12/12 16:57
@Usage :
@Desc :
'''
from chaojiying import Chaojiying
# USERNAME = 'Germey'
# PASSWORD = ''
# SOFT_ID = '915502'
# CAPTCHA_KIND = '9004'
# FILE_NAME = 'captcha2.png'
# client = Chaojiying(USERNAME, PASSWORD, SOFT_ID)
# result = client.post_pic(open(FILE_NAME, 'rb').read(), CAPTCHA_KIND)
# print(result)
import cv2
image = cv2.imread('captcha2.png')
image = cv2.circle(image, (108, 133), radius=10, color=(0, 0, 255), thickness=-1)
image = cv2.circle(image, (227, 143), radius=10, color=(0, 0, 255), thickness=-1)
cv2.imwrite('captcha2_label.png', image)