Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-stealth): Support puppeteer 14 private cdp client #653

Merged
merged 3 commits into from
Jun 20, 2022
Merged

fix(plugin-stealth): Support puppeteer 14 private cdp client #653

merged 3 commits into from
Jun 20, 2022

Conversation

0x7357
Copy link
Contributor

@0x7357 0x7357 commented Jun 16, 2022

It's just an example. I'm sure it could be nicer, but it works (at least for me; I couldn't run the tests because of Windows and there comes the error "Failed to download Firefox rv0.0.1!"). No time to fix this error.

Edit:
The problem is that puppeteer@14 has finally made '#client' private. However, there is still/or now the function Page._client(), which returns the client. To avoid problems between <@14 and >=@14, I made it a bit "uglier".

Edit (2):
I had to make a 2nd commit because for some reason the 1st push didn't push the changes to the defaultArg test(s). (And another one to remove the dummy blank spaces.)

@github-actions github-actions bot added plugin: puppeteer-extra PuppeteerExtra Plugin related plugin: stealth ㊙️ Detection evasion related labels Jun 16, 2022
@berstend berstend changed the title Fix: So that the plugin also works with puppeteer@14 fix(plugin-stealth): Support puppeteer 14 private cdp client Jun 20, 2022
@berstend
Copy link
Owner

Thanks! I might change the code to use a temporary client variable after merging but looks like it covers all occurrences.

@berstend berstend merged commit 37657e5 into berstend:master Jun 20, 2022
@berstend
Copy link
Owner

Successfully published:
 - puppeteer-extra-plugin-stealth@2.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: puppeteer-extra PuppeteerExtra Plugin related plugin: stealth ㊙️ Detection evasion related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants