Apify

Apify and Crawlee Official Forum

b
F
A
J
A

How to use Playwright's bypassCsp option?

J
L
5 comments
Hi @Jeno
You can try:

const playwrightCrawler = new PlaywrightCrawler({ launchContext: { launchOptions: { bypassCSP: true }, }, });
Hi @Lukas Celnar ,

I get this ts error:

Object literal may only specify known properties, and 'bypassCSP' does not exist in type 'LaunchOptions'. ts(2353)
Hi @Jeno
Could you please confirm that you are using playwright with latest version of crawlee?

I was able to successfully run this exact code without any error and typescript error/warning:
const crawler = new PlaywrightCrawler({ proxyConfiguration, requestHandler: router, headless: false, launchContext: { launchOptions: { bypassCSP: true }, }, });
Indeed, I just updated Playwright version and it accepts the option. Thank you for your help!
Add a reply
Sign up and join the conversation on Discord
Join