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.3.6
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.3.6.tar.gz | 554.9 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| turbo_surf-0.3.6-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| turbo_surf-0.3.6-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.3.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| turbo_surf-0.3.6-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.3.6.tar.gz
| Download URL | turbo_surf-0.3.6.tar.gz |
|---|---|
| Size | 554.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccd2c8708651a2b97cc8d807c415682e3b02e398330ec3250ce8730e69e067d3
|
|
BLAKE2b-256 checksum How to use checksums |
c2828940ca25bc0d234455664adbbc3b296bb4e8da26aba7f939e9459b12d23e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / turbo_surf-0.3.6-cp38-abi3-win_amd64.whl
| Download URL | turbo_surf-0.3.6-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 28.1 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8b5046505dd153b08dbdd4733de5be1470608d3a5d13e3e9e97370fa2b910651
|
|
BLAKE2b-256 checksum How to use checksums |
fba328afa02b7238afb9bb22360023b789cb1ec164ee63270c50757eee2bd9a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / turbo_surf-0.3.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | turbo_surf-0.3.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 31.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
edb199d20dd1aaafdec494d4267113637e4be02679bc3eaa343aac70ee6b794c
|
|
BLAKE2b-256 checksum How to use checksums |
0d27a7fa126b9088406381af63b9a6a64b5b1c0406c488789fd23d6e4ef397fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / turbo_surf-0.3.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | turbo_surf-0.3.6-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 |
29f1bfee6ecfc0644c4f4937822b571a04f40a3669e4f49b83e6d7866db97c03
|
|
BLAKE2b-256 checksum How to use checksums |
76e3df41899bd4acf089f673db4abd4932654dab7a27d85d28725a3f24142fcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / turbo_surf-0.3.6-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | turbo_surf-0.3.6-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 29.0 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
05cc8e46c9b87513dd53a2e4915f0975d6457ffc413a4c154212aa098f28acae
|
|
BLAKE2b-256 checksum How to use checksums |
4bb78204afdc395f2efcdd1d14dbe32405d5ac37e083c5087ee209d5df4827a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|