Skip to content

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

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions