
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
LLM-driven extraction from raw HTML and website screenshots, preserving spatial context with optional validation.
Extract accurate, structured facts from messy real-world content — raw HTML, screenshots, PDFs, JSON blobs or plain text — with almost zero compromise.
Pain-point | extracthero’s answer |
---|---|
DOM spaghetti (ads, nav bars, JS widgets) pollutes extraction. | DomReducer reduces the most-common HTML tags into a compact, linear corpus, stripping layout noise and script cruft while keeping the text you care about. |
HTML→Markdown conversions drop dynamic/JS-rendered elements. | DomReducer’s tag-level reduction keeps content that markdown pass-throughs often lose. |
LLM prompts that just say “extract price” are brittle. | Extracthero asks you to fill an ItemToExtract dataclass that includes the field’s name , desc , and optional text_rules , so the LLM knows the full context and returns sniper-accurate results. |
One-shot LLM calls are hard to debug and expensive. | Two-phase pipeline: FilterHero isolates the minimal fragment; ParseHero turns it into JSON. Fail fast and retry only the phase that broke. |
Post-hoc validation is messy. | Regex/type guards live inside each ItemToExtract ; a failed field flips success=False , so you can retry or send to manual review. |
from extracthero import ItemToExtract
price = ItemToExtract(
name="price",
desc="currency-prefixed current product price",
regex_validator=r"€\d+\.\d{2}",
text_rules=[
"Ignore crossed-out promotional prices.",
"Return the live price only."
],
example="€49.99"
)
Raw input ──▶ FilterHero (shrinks & isolates) ──▶ ParseHero (JSON) ──▶ dict + metrics
.filter_via_llm
/ .parse_via_llm
service.enforce_llm_based_*
) or skip HTML reduction (reduce_html=False
).pip install extracthero
from extracthero import Extractor, ItemToExtract
html = open("product-page.html").read()
fields = [
ItemToExtract(name="title", desc="product title", example="Wireless Keyboard"),
ItemToExtract(
name="price",
desc="currency-prefixed price",
regex_validator=r"€\d+\.\d{2}",
example="€49.99"
),
]
hero = Extractor()
result = hero.extract(html, fields, text_type="html")
print("✅ success:", result.success)
print(result.parse_op.content)
"129.50"
) are rejected for lacking “€”.Status | Feature |
---|---|
✅ | Sync FilterHero & ParseHero |
🟡 | Async heroes for high-throughput pipelines |
🟡 | Built-in key:value fallback parser |
🟡 | Vision-LLM screenshot mode |
🟡 | Pydantic schema-driven auto-prompts & auto-regex |
FAQs
LLM-driven extraction from raw HTML and website screenshots, preserving spatial context with optional validation.
We found that extracthero demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.