Skip to content

8.2 极验滑动验证码的识别 #10

Open

Description

@pen960223

在识别缺口时,
8. 识别缺口

def get_geetest_image(self, name='captcha.png'):
    """
    获取验证码图片
    :return: 图片对象
    """
    top, bottom, left, right = self.get_position()
    print(' 验证码位置 ', top, bottom, left, right)
    screenshot = self.get_screenshot()
    captcha = screenshot.crop((left, top, right, bottom))
    return captcha

此处的self.get_screenshot()是否有问题,调试时会报错,提示没有这个方法

    screenshot = self.get_screenshot()
AttributeError: 'DoubanLoginTest' object has no attribute 'get_screenshot'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions