The web fetcher that always finds a way
Project description
FetchQuest
FetchQuest is a resilient command-line web fetcher that escalates from plain HTTP to browser-like requests and, when needed, a real Playwright browser. It returns readable content instead of leaving the caller to diagnose blocks, JavaScript shells, rendering delays, and vanished pages.
$ fetchquest https://example.com/app --strategy playwright --wait-selector "#results" -v
# https://example.com/app → playwright (status 200)
Why FetchQuest
- Automatic escalation — try lightweight HTTP first, add browser headers when needed, and launch Chromium for JavaScript-rendered pages.
- Content-aware results — preserve raw responses, convert pages to readable text, or extract the main article content without surrounding boilerplate.
- Bounded browser readiness — require load, network-idle, or a visible CSS selector while keeping all waits inside one hard deadline.
- Reliable bulk work — fetch URL lists, continue through individual failures, avoid filename collisions, and write a Markdown report.
- Careful archive recovery — the opt-in Wayback strategy runs only after the original resource returns 404 or 410.
- Agent-friendly — use the CLI directly or install the included Claude Code plugin as a resilient replacement for WebFetch.
Install
Run a tagged release without installing it:
uvx fetchquest https://example.com
For a persistent command:
uv tool install fetchquest
fetchquest https://example.com
fetchquest --version
To run the latest unreleased source directly from main:
uvx --from git+https://github.com/slukyano/fetchquest fetchquest https://example.com
The Playwright strategy needs a one-time Chromium installation:
uvx playwright install chromium
Python 3.14 or newer and uv are required.
Quick start
# Fetch readable text to stdout
fetchquest https://example.com
# Save raw HTML and readable text
fetchquest https://example.com \
--output pages/ \
--formats raw,text
# Extract only the main article content
fetchquest https://example.com --formats text-trim
# Require JavaScript-rendered content to appear
fetchquest https://example.com/app \
--strategy playwright \
--wait-selector "#results article"
# Fetch a list and recover genuinely missing pages from Wayback
fetchquest --input urls.txt \
--output pages/ \
--formats raw,text \
--strategy smart-cache
Each input-file line contains a URL and an optional output prefix:
https://example.com/pricing pricing
https://example.com/about
How the smart chain works
- Fetch with plain httpx.
- If that does not return HTTP 200, retry with browser-like headers.
- When a successful HTML response is only an empty JavaScript shell, render it with Playwright.
- When both HTTP strategies fail because of TLS, try Playwright.
- With
smart-cache, consult Wayback only if an original HTTP response was 404 or 410.
Retries apply to transient failures such as HTTP 429, HTTP 503, and network
timeouts. The per-URL --timeout remains the hard deadline across strategy
attempts, retries, browser startup, required waits, render settling, and capture.
Strategies and formats
| Strategy | Behavior |
|---|---|
smart |
Automatic HTTP, browser-header, and Playwright chain |
smart-cache |
Smart chain plus Wayback for original 404/410 responses |
simple |
Plain httpx request |
ua-spoof |
httpx with browser-like request headers |
playwright |
Headless Chromium |
cache |
Wayback Machine only |
| Format | Behavior |
|---|---|
text |
Readable Markdown-like text; the default |
text-trim |
Main content without navigation, footers, or ads |
raw |
Original response bytes |
Run fetchquest --help for all options. The
CLI specification
documents exact defaults, constraints, output behavior, readiness semantics,
and exit codes.
Claude Code plugin
Install FetchQuest as a Claude Code plugin:
claude plugin marketplace add slukyano/fetchquest
claude plugin install fetchquest@fetchquest
The included fetch skill teaches Claude when to use FetchQuest and how to select formats, strategies, and browser-readiness controls.
Development
Setup, validation, network-test, documentation, and pull-request guidance lives in CONTRIBUTING.md. Project documentation starts at docs/index.md, and user-visible changes are tracked in CHANGELOG.md.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fetchquest-0.1.0.tar.gz.
File metadata
- Download URL: fetchquest-0.1.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
874eb5bc25b89e1d43969182fe519f484de6de71dce5d966f6ac669975f35dbe
|
|
| MD5 |
d9fba6bfd4904d3576e1a792e3ebfc0b
|
|
| BLAKE2b-256 |
1d31d316cdf9175160a4c38786d6159e9c052f6343af26b6dc0289191211a19e
|
File details
Details for the file fetchquest-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fetchquest-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ad8fe2d00f8d6c5edca9717ce8c706888bd8408199d14f150cc1325477df26
|
|
| MD5 |
a5dc373f4cb1f046fd41fc46e7126efd
|
|
| BLAKE2b-256 |
49d9b2de6b83c15d6e185aa6e9a998535b98405b8e6bc4d659eee44fb18efcdc
|