Skip to main content

octocrawl-client (Python)

Python client for the Octocrawl API: web pages as Markdown, tables and JSON, each page with its Evidence Record (final URL, fetch time, HTTP status, robots.txt decision, hashes of what was read and delivered), into pandas.

pip install 'octocrawl-client[pandas]'
npx octocrawl serve       # a local Octocrawl API on http://127.0.0.1:8787
import octocrawl_client

result = octocrawl_client.batch(
    ["https://books.toscrape.com/", "https://quotes.toscrape.com/"],
    formats=["markdown", "tables"],
)
df = result.to_pandas()          # one row per page
df[["url", "status", "fetched_at", "http_status", "raw_sha256"]]
result.report["succeeded"], result.report["failed"]

to_pandas() has one row per page, failed pages included, with these columns: url, status, reason, final_url, fetched_at, http_status, lane, robots_decision, raw_sha256, markdown_sha256, extractor, source_commit, cache_state, cached_at and markdown. A value W2L did not observe is missing (None, or <NA> for http_status), never 0. result.items keeps each page as the API answered it, its tables (formats=["tables"]) and full evidenceRecord included.

Options take the API's names in snake_case or camelCase: max_age=3_600_000, only_main_content=False, include_tags=["main"], parsers=[{"type": "pdf", "maxPages": 5}]. W2L(base_url=..., token=...) names another API (default W2L_API_URL, else http://127.0.0.1:8787; W2L_API_TOKEN). A batch takes up to 1,000 URLs; octocrawl_client.scrape, octocrawl_client.map and octocrawl_client.crawl work the same way. (The name octocrawl on PyPI belongs to another project.)

Licence: MIT. Source and the API reference: https://github.com/77777R7/Octocrawl

Metadata

Release files for octocrawl-client 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for octocrawl-client 0.3.0
File Size Uploaded
octocrawl_client-0.3.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for octocrawl-client 0.3.0
File Interpreter ABI Platform
octocrawl_client-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / octocrawl_client-0.3.0.tar.gz

Download URL octocrawl_client-0.3.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5f328e85166577015d1560ff22efe18ef8a84be028d19beec218374bdb24c68c
BLAKE2b-256 checksum
How to use checksums
edc04e231d40d4be6e66c9ffb1614ef47e062287c57b7b347fc497a0a897420c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / octocrawl_client-0.3.0-py3-none-any.whl

Download URL octocrawl_client-0.3.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8db3e253c1f8385387444700abea15159a3346cff9286a62be8264c3679b416
BLAKE2b-256 checksum
How to use checksums
8518ac07169b2177afa3267d4f7494b1690032d16f010c758128c4828889eb28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page