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.4.2
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.4.2.tar.gz | 568.4 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| turbo_surf-0.4.2-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| turbo_surf-0.4.2-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.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| turbo_surf-0.4.2-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 122.0 MB
Release files / turbo_surf-0.4.2.tar.gz
| Download URL | turbo_surf-0.4.2.tar.gz |
|---|---|
| Size | 568.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba6dad12d236871ec8a06f0ceee09517c95845b14b50038d25755bd17e9e7dfb
|
|
BLAKE2b-256 checksum How to use checksums |
cf897b1ba0396f9b5bcb45bd125f11071a6f1a39bfaa54b2c091de51eb7a2804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.4.2-cp38-abi3-win_amd64.whl
| Download URL | turbo_surf-0.4.2-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 28.2 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4f3e1a8a19e0f2cd8ae39594f21f1976ab19e2158831eb8ef34bf24d878b2fae
|
|
BLAKE2b-256 checksum How to use checksums |
99ba06f9f20c8f8b97d22896f1703ac30053696125fb260e95322fd8b743db1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.4.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | turbo_surf-0.4.2-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 |
d7e2413c126215df7def5f7af856c49ce9ce5a3cfd8a2308294c5f89ac551656
|
|
BLAKE2b-256 checksum How to use checksums |
ffd39cebb113072f01c50875701a161b54aa1314e0895e3e6f3a8a89e2b656be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | turbo_surf-0.4.2-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 |
b6f400f2d2ab03c61799aa0488c979758e9de249fbfbbe049d39bf6bcf29c1e0
|
|
BLAKE2b-256 checksum How to use checksums |
8ae2e33c4a3ec9b47e1e6e01bc437a6fbf148a720b1facac0d2d1272ec824540
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / turbo_surf-0.4.2-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | turbo_surf-0.4.2-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 |
b25fab1954109b65b4b27e50a05a1a1166f4525ef16b883633de4c9fcaccc75e
|
|
BLAKE2b-256 checksum How to use checksums |
0ef86fc4232a309354ae31b23894f92f170205fa3a13469038c1e66e422eddb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|