A simple tool to scrape Cloudflare clearance cookies (cf_clearance) from websites with Cloudflare challenges.
Install package:
# ✨ Auto-detect
npx nypm install @pinjs/cf-scraper-bypass
# npm
npm install @pinjs/cf-scraper-bypass
# yarn
yarn add @pinjs/cf-scraper-bypass
# pnpm
pnpm install @pinjs/cf-scraper-bypass
# bun
bun install @pinjs/cf-scraper-bypass
import Scraper from "@pinjs/cf-scraper-bypass";
const scraper = new Scraper({
headless: false,
skip_chromium_download: false,
chromium_path: "/usr/bin/chromium-browser",
wait_for_network_idle: false,
PUP_TIMEOUT: 16_000,
});
scraper
.proxy("https://google.com", {})
.then((res) => console.log(res));
Import:
ESM (Node.js, Bun)
import Scraper from "@pinjs/cf-scraper-bypass";
CommonJS (Legacy Node.js)
const Scraper = require("@pinjs/cf-scraper-bypass");
CDN (Deno, Bun and Browsers)
import Scraper from "https://esm.sh/@pinjs/cf-scraper-bypass";
local development
Published under the MIT license.
Made by community 💛
🤖 auto updated with automd