Skip to main content

Installation

Pry runs on Python 3.11+ with FastAPI, Playwright, FlareSolverr, Redis, and httpx under the hood. There are three ways to install it.

:::note PyPI name

The PyPI name pry is already taken — install the package as pry-scraper directly from the repository.

:::

Option 1: pip (bare metal)

Install from the repository (Codeberg mirror shown):

# Editable install from a local clone
git clone https://git.rugmunch.io/RugMunchMedia/pryscraper.git
cd pryscraper
pip install -e .

# OR install directly from the remote
pip install "pry-scraper @ git+https://codeberg.org/cryptorugmunch/pryscraper.git"

Install the Playwright browser runtime (required for full browser features):

playwright install chromium

Start the server:

pry serve
# API listens on http://localhost:8002 (configurable via PRY_HOST / PRY_PORT)

Optional but recommended for Cloudflare bypass — run FlareSolverr as a sidecar:

docker run -d -p 8192:8191 ghcr.io/flaresolverr/flaresolverr

Use the bundled docker-compose.yml — it wires up Pry, FlareSolverr, and an optional Tor container with health checks, restart policies, and resource limits out of the box.

git clone https://git.rugmunch.io/RugMunchMedia/pryscraper.git
cd pryscraper
cp .env.example .env # optional for local use
docker compose up -d
  • Pry API: host 127.0.0.1:8005 → container 8002
  • FlareSolverr: host 127.0.0.1:8192 → container 8191
  • Tor (profile tor only): host 127.0.0.1:9050/9051 → container 9050/9051

See Docker Compose for the full reference.

Option 3: from source (development)

For development, use the Makefile targets:

make install # Install with dev dependencies
make dev # Start the hot-reload server

Quality gates:

make lint # ruff check
make format # ruff format
make typecheck # mypy
make test # pytest
make check # Full audit (lint + typecheck + test)
make security # bandit + safety

Post-install verification

# Health endpoint
curl http://localhost:8002/health

# If you set PRY_API_KEY, remember to send the Bearer token:
curl -H "Authorization: Bearer <key>" http://localhost:8002/health

CLI reference

CommandDescription
pry open <url>Scrape URL to clean markdown
pry watch <url>Monitor page for changes
pry crawl <url>Crawl multiple pages
pry batch <file>Batch scrape URLs from file
pry parse <url>Parse PDF/DOCX/image
pry ss <url>Take screenshot
pry run [pry.yml]Execute a job file
pry serveStart the API server
pry mcp serveStart the MCP server (stdio transport)
pry completions [bash|zsh|fish]Print shell-autocomplete install instructions

Common CLI options:

FlagApplies toDescription
--jsonopenOutput as JSON
--schema <file>openJSON schema file for extraction
--timeout <sec>openRequest timeout
--webhook <url>watchWebhook URL for change notifications
--max-pages <n>crawlMaximum pages to crawl
--template <json>batchExtraction template as JSON string
-o <file>crawl, ssOutput file path
--port <n>serveServer port (default: 8002)

Next steps