Skip to content

Commit

Permalink
Add fixes for changes to the captcha process
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronthebaron committed Jun 7, 2024
1 parent a157c1e commit 9ee0597
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/provider/googleapps/googleapps.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func (kc *Client) Authenticate(loginDetails *creds.LoginDetails) (string, error)
captchaInputIds := []string{
"logincaptcha",
"identifier-captcha-input",
"captchaimg",
}

var captchaFound *goquery.Selection
Expand All @@ -103,6 +104,10 @@ func (kc *Client) Authenticate(loginDetails *creds.LoginDetails) (string, error)

for captchaFound != nil && captchaFound.Length() > 0 {
captchaImgDiv := responseDoc.Find(".captcha-img")
if captchaImgDiv != nil {
captchaImgDiv = responseDoc.Find("div[data-auto-init='CaptchaInput']")
captchaInputId = "ca"
}
captchaPictureSrc, found := goquery.NewDocumentFromNode(captchaImgDiv.Children().Nodes[0]).Attr("src")

if !found {
Expand Down

0 comments on commit 9ee0597

Please sign in to comment.