Package Exports
- cloudflare-scraper
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cloudflare-scraper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cloudflare-scraper
Puppeteer (chromium headless) is used to retrieve cloudflare cookies then request module is used to perform requests making this solution reliable but also pretty fast.
Install
npm install cloudflare-scraperQuick Example
const cloudflareScraper = require('cloudflare-scraper');
(async () => {
try {
const response = await cloudflareScraper.get('https://cloudflare-url.com');
console.log(response);
} catch (error) {
console.log(error);
}
})();API
TODO (same api as request package)
TODO list
- improve stealth
- proxy support
- retry ?