diff --git a/packages/puppeteer-extra-plugin-recaptcha/src/content-hcaptcha.ts b/packages/puppeteer-extra-plugin-recaptcha/src/content-hcaptcha.ts index 6665cfdb..71a21e53 100644 --- a/packages/puppeteer-extra-plugin-recaptcha/src/content-hcaptcha.ts +++ b/packages/puppeteer-extra-plugin-recaptcha/src/content-hcaptcha.ts @@ -82,7 +82,7 @@ export class HcaptchaContentScript { private _extractInfoFromIframes(iframes: HTMLIFrameElement[]) { return iframes - .map(el => el.src.replace('.html#', '.html?')) + .map(el => el.src.replace('#', el.src.includes('?') ? '&' : '?')) .map(url => { const { searchParams } = new URL(url) const result: types.CaptchaInfo = {