Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pin705/cf-scraper-bypass

A simple tool to scrape Cloudflare clearance cookies (cf_clearance) from websites with Cloudflare challenges.
https://github.com/pin705/cf-scraper-bypass

bypass cloudflare cloudflare-bypass nodejs recaptcha scraper-api

Last synced: 8 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# @pinjs/cf-scraper-bypass

[![npm version](https://img.shields.io/npm/v/@pinjs/cf-scraper-bypass?color=yellow)](https://npmjs.com/package/@pinjs/cf-scraper-bypass)
[![npm downloads](https://img.shields.io/npm/dm/@pinjs/cf-scraper-bypass?color=yellow)](https://npmjs.com/package/@pinjs/cf-scraper-bypass)

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

## Usage

Install package:

```sh
# ✨ 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
```

```js
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)

```js
import Scraper from "@pinjs/cf-scraper-bypass";
```

**CommonJS** (Legacy Node.js)

```js
const Scraper = require("@pinjs/cf-scraper-bypass");
```

**CDN** (Deno, Bun and Browsers)

```js
import Scraper from "https://esm.sh/@pinjs/cf-scraper-bypass";
```

## Development

local development

- Clone this repository
- Install latest LTS version of [Node.js](https://nodejs.org/en/)
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`

## License

Published under the [MIT](https://github.com/pin705/cf-scraper-bypass/blob/main/LICENSE) license.
Made by [community](https://github.com/pin705/cf-scraper-bypass/graphs/contributors) 💛





---

_🤖 auto updated with [automd](https://automd.unjs.io)_