turbo-surf (Python)
Browserless, native-speed web crawler + extractor with a real V8 JS-render tier — a PyO3 binding over the turbo-surf Rust engine. Fetch-free: you pass a page's HTML in, and get a view out (Markdown, visible text, links, a typed extraction, an accessibility tree). For JS-gated pages, the engine runs the page's own scripts in a true V8 isolate over a native DOM — no headless Chromium.
import turbo_surf as ts
html = open("page.html").read()
ts.markdown(html, base_url="https://example.com/") # -> Markdown str
ts.text(html) # -> visible text
ts.links(html, base_url="https://example.com/") # -> list[str]
# Typed extraction: a JSON schema maps field names to selector specs.
schema = '{"title": {"selector": "h1"}, "prices": {"selector": ".price", "list": true}}'
ts.extract(html, schema, base_url="https://example.com/") # -> JSON str
# JS-gated page: run its own scripts, read the hydrated DOM.
hydrated = ts.render(html, script, base_url="https://example.com/")
Fatal faults (malformed schema JSON, a render-tier failure) raise
turbo_surf.TurboSurfError; the non-JS views never raise.
Install
pip install turbo-surf
Prebuilt abi3 wheels (CPython 3.8+) are published for Linux (x86_64/aarch64), macOS (arm64), and Windows (x64).
API
| function | returns | notes |
|---|---|---|
markdown(html, base_url="") |
str |
Markdown render |
text(html) |
str |
visible text |
title(html) |
str |
document <title> |
html(html) |
str |
re-serialized HTML |
links(html, base_url="") |
list[str] |
resolved hyperlink targets |
interactive_elements(html, base_url="") |
JSON str |
links/buttons/inputs |
accessibility_tree(html) |
JSON str |
a11y tree |
hydration_state(html) |
JSON str |
hydration probe |
detect(html) |
JSON str |
is the page JS-gated? |
query(html, selector, kind=None) |
JSON str |
kind = "css"/"xpath"/auto |
extract(html, schema_json, base_url="") |
JSON str |
typed extraction |
evaluate(html, script) |
str |
run script over the DOM (sync) |
render(html, script, base_url="") |
str |
hydrated HTML after page scripts run |
transform(src, ts=False, jsx=False) |
str |
TS/JSX → classic JS (swc) |
MIT licensed.
Metadata
Release files for turbo-surf 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| turbo_surf-0.5.0.tar.gz | 725.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| turbo_surf-0.5.0-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| turbo_surf-0.5.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| turbo_surf-0.5.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| turbo_surf-0.5.0-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 122.5 MB
Release files / turbo_surf-0.5.0.tar.gz
| Download URL | turbo_surf-0.5.0.tar.gz |
|---|---|
| Size | 725.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f2b83c68ae6ec61afc9a18f228c720049cda90e78336c23b0eb057d7ff252b1
|
|
BLAKE2b-256 checksum How to use checksums |
9a451cacaf3502adfed290942538957c0bf5d19382b2ab519b3d39747eeb596b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.5.0-cp38-abi3-win_amd64.whl
| Download URL | turbo_surf-0.5.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 28.2 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f6199f2245aab8bcb66f2967b963a7970d4dcfd0ea636cb916780f2c2c5ba9fe
|
|
BLAKE2b-256 checksum How to use checksums |
60c40a64f16a37b196eaf02499d7a7a853a9a8315230379f995e79dc6c7d19d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.5.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | turbo_surf-0.5.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 31.4 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ab190a7d8e6734f9a26e11b0aa6bf9d60d1c9eff0be5870b42a702af9bd89076
|
|
BLAKE2b-256 checksum How to use checksums |
5e93ce2f6c57715f951447d4337436f49d0c8c9f2798851a29bd68f8b2c5b9f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.5.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | turbo_surf-0.5.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 33.1 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
58d4c2a14ce90536516641f9932cec71fe3378dd50dfbe526e1423a82b4f88e0
|
|
BLAKE2b-256 checksum How to use checksums |
5b223a6ec496635c45445410d4f8682d3ec0cb77dd9a4b6fee0d5cd4eaeb6123
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.5.0-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | turbo_surf-0.5.0-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 28.9 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0a041afc254df4c12c7f6900da33adb436b852a9faeedbf691b4d55906cc94bc
|
|
BLAKE2b-256 checksum How to use checksums |
cd0553fabc9de29e5e486fab147b9ee687643e4e392463beb62aebf70f64c6d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|