cloudflare-scrape

(★ 3,536)

A Python module to bypass Cloudflare's anti-bot page.

File Explorer

  • .coveragerc
  • .gitignore
  • .travis.yml
  • appveyor.yml
  • LICENSE
  • Makefile
  • MANIFEST.in
  • Pipfile
  • Pipfile.lock
  • pytest.ini
  • README.md
  • setup.py
  • tox.ini

# Installation Guide

python
Prerequisites

Setup Steps

pip install cfscrape

Install the cfscrape package via PyPI.

Key Commands

pip install cfscrape

Install the cloudflare-scrape package.

pip install -U cfscrape

Upgrade the cloudflare-scrape package to the latest version.

python setup.py install

Install the package directly from the cloned repository source.

Node.js 10 or above must be installed on your system to bypass Cloudflare's JavaScript obfuscation.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

brew install

View Details ▼

Install a Homebrew formula or cask.

brew install {{formula|cask}}

Install a formula/cask:

brew install {{[-s|--build-from-source]}} {{formula}}

Build and install a formula from source (dependencies will still be installed from bottles):

brew install {{[-n|--dry-run]}} {{formula|cask}}

Download the manifest, print what would be installed but don't actually install anything:

🔍

node

View Details ▼

Server-side JavaScript platform (Node.js).

node {{path/to/file}}

Run a JavaScript file:

node

Start a REPL (interactive shell):

node --watch {{path/to/file}}

Execute the specified file restarting the process when an imported file is changed (requires Node.js version 18.11+):

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

pip show

View Details ▼

Show information about installed packages.

pip show {{package}}

Show information about a package:

pip show {{[-v|--verbose]}} {{package}}

Show all information about a package:

pip show {{[-f|--files]}} {{package}}

Show all installed files for a package:

🔍

python

View Details ▼

Python language interpreter.

python

Start a REPL (interactive shell):

python {{path/to/file.py}}

Execute a specific Python file:

python -i {{path/to/file.py}}

Execute a specific Python file and start a REPL:

🔍

apt-get

View Details ▼

Debian and Ubuntu package management utility.
Search for packages using `apt-cache`.
It is recommended to use `apt` when used interactively in Ubuntu versions 16.04 and later.

sudo apt-get update

Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands):

sudo apt-get install {{package}}

Install a package, or update it to the latest available version:

sudo apt-get remove {{package}}

Remove a package:

// repository documentation