Home > Mobile >  How do I fetch data without cloudflare in JavaScript?
How do I fetch data without cloudflare in JavaScript?

Time:06-16

The fetch doesn't work


const response = await fetch(url)
const html = await response.json()

It returns a page with Cloudflare!

What should I do?

CodePudding user response:

to bypass cloudflare you can either try this package cloudscraper or you can get the content using a headless Chrome and the popular is Puppeteer.

  • Related