Skip to content
generated from unjs/template

A simple tool to scrape Cloudflare clearance cookies (cf_clearance) from websites with Cloudflare challenges.

License

Notifications You must be signed in to change notification settings

pin705/cf-scraper-bypass

Repository files navigation

@pinjs/cf-scraper-bypass

npm version npm downloads

A simple tool to scrape Cloudflare clearance cookies (cf_clearance) from websites with Cloudflare challenges.

Usage

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";

Development

local development
  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Published under the MIT license. Made by community 💛


🤖 auto updated with automd