diff --git a/capmonster_python/capmonster.py b/capmonster_python/capmonster.py index 1c8c5bd..6436fb5 100644 --- a/capmonster_python/capmonster.py +++ b/capmonster_python/capmonster.py @@ -73,7 +73,9 @@ def report_incorrect_captcha(self, captcha_type: str, task_id: int) -> bool: :return: True if the captcha is successfully reported, False otherwise. :raises CapmonsterException: If the captcha type is invalid. """ - if captcha_type != "image" or "token": + valid_captcha_types = ["image", "token"] + + if captcha_type not in valid_captcha_types: raise CapmonsterException( 1, "ERROR_INCORRECT_CAPTCHA_TYPE", "Valid captcha_type parameters are only 'image' or 'token'.") try: diff --git a/setup.py b/setup.py index e5b292b..08cac30 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="capmonster_python", - version="2.6.1", + version="2.6.2", packages=["capmonster_python"], url="https://github.com/alperensert/capmonster_python", long_description=long_description,