糗事百科

This commit is contained in:
criseLYJ
2019-03-10 22:03:46 +08:00
parent 5f13f44bea
commit 2c25117621
27 changed files with 38 additions and 29 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ update_time:2019-3-7
class BiliBili():
"""
登陆B站, 处理极验验证码
登陆B站, 处理验证码
电脑的缩放比例需要为100%, 否则验证码图片的获取会出现问题
"""
@@ -114,8 +114,8 @@ class BiliBili():
:param y: 像素点的y坐标
:return: 像素是否相同
"""
pixel1 = img1.load()[x, y]
pixel2 = img2.load()[x, y]
pixel1 = img1.load()[x-1, y]
pixel2 = img2.load()[x-1, y]
threshold = 100
if abs(pixel1[0] - pixel2[0]) < threshold and abs(pixel1[1] - pixel2[1]) < threshold and abs(
pixel1[2] - pixel2[2]) < threshold: