RPA 與驗證碼 矛與盾的戰爭?

在執行 RPA/軟體機器人 的專案時,蠻常會碰到客戶詢問起驗證碼(Captcha) 如何處理的問題,本篇文章中我們就分享使用 Azure Vision 以及 Google Vision 來處理驗證碼的效果,以及手把手的教各位使用 Google Vision 來處理網頁識別碼的作法。

步驟一. 請到 Google Cloud 申請一個 Google Vision API service, 並產生一個可以使用該服務提供的金鑰(Access Token)

步驟二. 請在 Power Automate Desktop(PAD) 中建立一個名為 ‘Google_Vision’ 的子流程,並將以下程式碼複製貼上。詳細的操作方法請見上一篇文章。

==我是分隔線==

Cognitive.Google.Vision.TextDetectionFromFile APIKey: $'''請放入您的 Google Vision API 金鑰''' ImageFile: filepath_for_captcha Timeout: 30 Response=> JSONResponse StatusCode=> StatusCode
SET captcha_solution TO JSONResponse['responses'][0]['textAnnotations'][0]['description']
Display.ShowMessage Title: $'''Google Vision 對驗證碼的辨識結果''' Message: captcha_solution Icon: Display.Icon.Information Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True ButtonPressed=> ButtonPressed
Text.Split Text: captcha_solution StandardDelimiter: Text.StandardDelimiter.Space DelimiterTimes: 1 Result=> TextList
Text.Join List: TextList Result=> captcha_solution_parsed

==我是分隔線==

步驟三. 將步驟一 取得的金鑰貼到 PAD 子流程第一個動作內的 ‘API 金鑰’ 欄位

步驟四. 請依照以下 Youtube 影片的教學操作,您就可以掌握  RPA 處理驗證碼的秘訣了哦!