Skip to content

Commit 0909d5a

Browse files
committed
Update image_to_text.py
1 parent 8d9590c commit 0909d5a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/python3_capsolver/image_to_text.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ class ImageToText(CaptchaParams):
8383
"""
8484

8585
def __init__(
86-
self, api_key: str, captcha_type: Union[CaptchaTypeEnm, str] = CaptchaTypeEnm.ImageToTextTask, **kwargs
86+
self,
87+
api_key: str,
88+
captcha_type: Union[CaptchaTypeEnm, str] = CaptchaTypeEnm.ImageToTextTask,
89+
**kwargs,
8790
):
91+
if isinstance(captcha_type, str):
92+
captcha_type = CaptchaTypeEnm(captcha_type)
8893

8994
super().__init__(api_key=api_key, captcha_type=captcha_type, **kwargs)

0 commit comments

Comments
 (0)