fix: captcha configuration

This commit is contained in:
orion 2023-10-14 16:09:32 -05:00
parent 53d46a5c1e
commit 3770f3b993
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -8,7 +8,8 @@ import Captcha from 'puppeteer-extra-plugin-recaptcha'
/** @typedef {import('puppeteer').Page & import('puppeteer-extra-plugin-recaptcha/dist/types').RecaptchaPluginPageAdditions} Page */
/** @type {(_: PluginOptions) => (_: PuppeteerExtra) => () => PuppeteerExtra} */
export const _captcha = o => p => () => p.use(Captcha(o))
export const _captcha = o => p => () =>
p.use(Captcha(Object.assign({ throwOnError: true }, o)))
/** @type {(_: Page) => () => Promise<{captchas: CaptchaInfo[], filtered: unknown[]}>} */
export const _findCaptchas = p => () => p.findRecaptchas()