From 7a5ae9ec66bb6083e7007b64a5e9ede75429a3a4 Mon Sep 17 00:00:00 2001 From: spiduler Date: Sat, 7 Nov 2020 19:09:43 +0900 Subject: [PATCH] sdfdf --- src/component/CaptchaComp.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/component/CaptchaComp.js b/src/component/CaptchaComp.js index c3c96ca..9f67c39 100644 --- a/src/component/CaptchaComp.js +++ b/src/component/CaptchaComp.js @@ -69,7 +69,10 @@ class CaptchaComp { requestResolve(driver) { return driver.findElement(By.css('#hcaptcha iframe')).getAttribute('src') - .then(src => url.parse(src, true).query.k) + .then(src => { + let googlekey = url.parse(src, true).query.k + if (!googlekey) logger.throwError('Googlekey not found', { src: src }) + }) .then(googlekey => { return driver.getCurrentUrl().then(pageurl => { return this.request({ googlekey: googlekey, pageurl: pageurl }).then(res => {