This commit is contained in:
spiduler
2020-11-06 22:16:12 +09:00
parent afd0756715
commit f66e237c3e

View File

@@ -32,7 +32,7 @@ class CaptchaComp {
} }
isCaptchaPage(html) { isCaptchaPage(html) {
return html.indexOf('grecaptcha') > -1 || html.indexOf('www.google.com/recaptcha/api2/anchor') > -1 return html.indexOf('hcaptcha') > -1 || html.indexOf('www.google.com/recaptcha/api2/anchor') > -1
} }
getUrl(params) { getUrl(params) {
@@ -61,7 +61,7 @@ class CaptchaComp {
} }
requestResolve(driver) { requestResolve(driver) {
return driver.findElement(By.css('#grecaptcha iframe')).getAttribute('src') return driver.findElement(By.css('#hcaptcha iframe')).getAttribute('src')
.then(src => url.parse(src, true).query.k) .then(src => url.parse(src, true).query.k)
.then(googlekey => { .then(googlekey => {
return driver.getCurrentUrl().then(pageurl => { return driver.getCurrentUrl().then(pageurl => {