AI-Powered Selector Discovery - Discover once, scrape forever
Project description
[!WARNING] Yosoi is currently in Alpha. The API is expected to change significantly. We do not expect a stable API until we are out of Beta.
Yosoi - You Only Scrape Once (iteratively)
Discover once, scrape forever
Give Yosoi a URL, domain, or group of URLs, and it uses AI to automatically discover the best selectors for structured content.
Installation
# Install yosoi using uv
uv add yosoi
Browser Fetcher (JavaScript-heavy pages)
Yosoi supports a browser-based HTML fetcher powered by void_crawl — a Rust-native CDP client that renders JavaScript-heavy pages via Chrome DevTools Protocol.
Install void_crawl from the Void-Crawl repo (requires Rust ≥ 1.86, maturin ≥ 1.7, Chrome/Chromium), then use it via the create_fetcher API or the yosoi.vc convenience module:
# Fetcher interface
from yosoi.core.fetcher import create_fetcher
async def scrape():
fetcher = create_fetcher("browser", no_sandbox=True)
async with fetcher:
result = await fetcher.fetch("https://example.com")
print(result.html)
# vc convenience module — pool-based (recommended)
from yosoi import vc
async def scrape():
async with vc.pool() as pool:
async with await pool.acquire() as tab:
await tab.navigate("https://example.com")
html = await tab.content()
See examples/pool_usage.py and examples/pool_fetch_cleaned.py for full working examples.
Quick Start
API Key
Export your API Key or create a .env file
# Set keys for whichever providers you want to use
<PROVIDER_NAME>_KEY=your_api_key_here
GROQ_API_KEY=your_groq_key_here # groq/...
GEMINI_API_KEY=your_gemini_api_key_here # gemini/...
OPENAI_API_KEY=your_openai_api_key_here # openai/...
CEREBRAS_API_KEY=your_cerebras_api_key_here # cerebras/...
OPENROUTER_API_KEY=your_openrouter_key_here # openrouter/...
See the full list of supported providers
Basic Usage
CLI Usage
# Specify model explicitly with -m provider:model-name
uv run yosoi -m groq:llama-3.3-70b-versatile --url https://qscrape.dev/l1/eshop/catalog/?cat=Forge%20%26%20Smithing --contract Product
You can then find your scraped content, selectors and logs in ./.yosoi relative to the directory you run the CLI command from.
Python Usage
We also have example scripts, you can find them in our example docs
Citation
If you use yosoi in your research or projects, please cite it using the metadata provided in the CITATION.cff file.
Contact
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 yosoi-0.0.2a19.tar.gz.
File metadata
- Download URL: yosoi-0.0.2a19.tar.gz
- Upload date:
- Size: 214.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701a31293fce8b06daa2ccdaed15d534d41d7682992e940ce041e44b6b6912d2
|
|
| MD5 |
912d04886177017601abc9da7c933e39
|
|
| BLAKE2b-256 |
c069e87ea3c222c836d226d4f72e75741fe7449eb4240633db1b6016fe486f1a
|
Provenance
The following attestation bundles were made for yosoi-0.0.2a19.tar.gz:
Publisher:
publish.yaml on CascadingLabs/Yosoi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yosoi-0.0.2a19.tar.gz -
Subject digest:
701a31293fce8b06daa2ccdaed15d534d41d7682992e940ce041e44b6b6912d2 - Sigstore transparency entry: 1723138422
- Sigstore integration time:
-
Permalink:
CascadingLabs/Yosoi@f7debc14384e2c0dcc42ac3f1427f1bc73f901de -
Branch / Tag:
refs/tags/0.0.2a19 - Owner: https://github.com/CascadingLabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f7debc14384e2c0dcc42ac3f1427f1bc73f901de -
Trigger Event:
release
-
Statement type:
File details
Details for the file yosoi-0.0.2a19-py3-none-any.whl.
File metadata
- Download URL: yosoi-0.0.2a19-py3-none-any.whl
- Upload date:
- Size: 276.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad33247444f1491be34c2f4c541638a2c58001efa437dda6abdf87902cf94fa
|
|
| MD5 |
208f9b2fc44cfcd0dbd23de9143c6811
|
|
| BLAKE2b-256 |
bf6c8f4cfefa7ea2c34f3d2a47e4908ccead5ac10846380400ae22a1c6b4046c
|
Provenance
The following attestation bundles were made for yosoi-0.0.2a19-py3-none-any.whl:
Publisher:
publish.yaml on CascadingLabs/Yosoi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yosoi-0.0.2a19-py3-none-any.whl -
Subject digest:
9ad33247444f1491be34c2f4c541638a2c58001efa437dda6abdf87902cf94fa - Sigstore transparency entry: 1723138617
- Sigstore integration time:
-
Permalink:
CascadingLabs/Yosoi@f7debc14384e2c0dcc42ac3f1427f1bc73f901de -
Branch / Tag:
refs/tags/0.0.2a19 - Owner: https://github.com/CascadingLabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f7debc14384e2c0dcc42ac3f1427f1bc73f901de -
Trigger Event:
release
-
Statement type: