Skip to content

Commit 0387b42

Browse files
committed
获取验证码-然后识别 todo
1 parent ba4d509 commit 0387b42

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

my06-验证码识别/使用Tessract-OCR识别验证码/北京公交一卡通_验证码/获取验证码-然后识别.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
url = 'http://www.bjsuperpass.com/captcha.svl?d=1503144107405'
2525
rs = requests.get(url, headers=headers, timeout=10)
2626
print('获取公交一卡通网站的验证码',rs.status_code)
27+
#TODO 获取cookies
28+
2729

2830
print('用BytesIO导入到Image,Numpy,Opencv')
2931
s1 = BytesIO(rs.content) # img = Image.open(BytesIO(resp.read()))
@@ -42,4 +44,5 @@
4244
# ocr.SetPageSegMode(tesseract.PSM_AUTO)
4345
# ocr.SetImage(img)
4446

45-
print('验证码是',tesserocr.image_to_text(img))
47+
print('验证码是',tesserocr.image_to_text(img))
48+
#TODO 发送cookies

0 commit comments

Comments
 (0)