Rayrun
โ† Back to Discord Forum

Error 1020 Access Denied when opening open-sea url

When I opened an open-sea link with the playwright, I got the message Error 1020 Access Denied. But it works with a normal browser, does anyone know how I can fix this problem? I have researched this problem, someone told me that open-sea may block automation browsers. Is there any way that I can bypass this? Example: https://opensea.io/assets/ethereum/0xf51bfc40c10289246e5bba7afedeb8cf976c3250/4045563695846915711900312409516322895108670705

This thread is trying to answer question "How can I bypass the Error 1020 Access Denied when opening an OpenSea link with the Playwright automation browser?"

8 replies
await context.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36');
``` for example, you can pick a useragent here: https://www.useragents.me/
Headless is good too

Thanks for your help! I will try with your suggestion and will update the result here. ๐Ÿค

@inf: I'm getting ``TypeError: browserContext.setUserAgent is not a function`` error, can you help? @inf

I'm getting TypeError: browserContext.setUserAgent is not a function error, can you help? @inf

sir can u help ? @inf

@gpluta: I tried this before but I still get the cloudflare error @gpluta

I tried this before but I still get the cloudflare error @gpluta

If you try with your user agent and u still have the same problem. You'll need an endpoint to give instructions to the page (can't help you for that), or you can try the --headed option too

@konteynn: `await this.page.setExtraHTTPHeaders({ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.1; rv:109.0) Gecko/20100101 Firefox/119.0', });` You could try with this one. I hope this helps! (Tested with Firefox)

await this.page.setExtraHTTPHeaders({ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.1; rv:109.0) Gecko/20100101 Firefox/119.0', }); You could try with this one. I hope this helps! (Tested with Firefox)

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.