Skip to main content

Chrome-driven SaaS content scraper — yields a uniform Document stream for downstream pipelines (pleno-anonymize, pleno-secret-scanner).

Project description

saas-scraper

Chrome-driven SaaS content scraper. Yields a uniform Document stream for downstream pipelines (e.g. pleno-anonymize, pleno-secret-scanner).

Where API-based connectors stop — locked-down workspaces, SSO-only sessions, content only visible in the UI — saas-scraper keeps going by driving a real Chrome session via Playwright. Reuses your existing browser profile so login, MFA and SSO flows are inherited rather than re-implemented per provider.

Install

uv add saas-scraper
# one-time browser binary install
uv run playwright install chromium

Or as a CLI:

pipx install saas-scraper
playwright install chromium

Usage

# List available connectors
saas-scraper list

# Scrape a Slack workspace and stream Documents to stdout (NDJSON)
saas-scraper fetch slack --workspace acme --since 7d

# Save to a file for downstream consumption
saas-scraper fetch notion --workspace acme > docs.ndjson

Programmatic use:

import asyncio
from saas_scraper import BrowserSession, registry

async def main() -> None:
    async with BrowserSession() as session:
        connector = registry.create("slack", session=session, workspace="acme")
        async for doc in connector.discover_and_fetch():
            print(doc.ref.path, len(doc.text or b""))

asyncio.run(main())

Connectors

Connector Status Notes
slack implemented (v0.2) channel sidebar walk, message pane scrape; no scroll-walking yet
github scaffolded
gitlab scaffolded
jira scaffolded
confluence scaffolded
notion scaffolded
bitbucket scaffolded

The v0.1.0 release ships the Document protocol, the Chrome session manager, and a working scaffold per connector. Additional providers and per-connector hardening land in subsequent releases — see issues.

Why Chrome and not the API?

  • Inherits SSO / MFA / SCIM-locked sessions that don't cleanly expose API tokens to a scanner role.
  • Bypasses API quota tiers that throttle org-wide content enumeration.
  • Reaches UI-only surfaces (Notion comments, Slack canvas, Jira views).

When an official API exists and is sufficient, prefer that — saas-scraper is the fallback for the cases where it isn't.

Development

uv sync --all-extras
uv run playwright install chromium
uv run pytest
uv run ruff check
uv run mypy src

The default pytest pass exercises plumbing only (Document protocol, registry wiring, CLI helpers). Live browser scrapes against real SaaS providers are not part of CI; run them locally with saas-scraper fetch <connector> --headed so a real Chromium window opens for first-time SSO.

Release

vX.Y.Z tag pushes trigger PyPI trusted publishing via GitHub Actions — no manual token. The first publish requires a one-time Trusted Publisher configuration at https://pypi.org/manage/account/publishing/:

Field Value
PyPI Project Name saas-scraper
Owner plenoai
Repository name saas-scraper
Workflow name release.yml
Environment name pypi

After that, every tag matching v* will publish automatically.

License

AGPL-3.0-or-later.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saas_scraper-0.2.0.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saas_scraper-0.2.0-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file saas_scraper-0.2.0.tar.gz.

File metadata

  • Download URL: saas_scraper-0.2.0.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for saas_scraper-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4ed2bb11572657aac262f24895b8a5cccbed08152db8a0ebef15902973df2c8f
MD5 31c1f6e1e8df69a12f88a8e7a3f3134e
BLAKE2b-256 5cc47dece15f8bfccbc761c3a8f106ddf1e2845d05b3dc799ee1bd11004be700

See more details on using hashes here.

Provenance

The following attestation bundles were made for saas_scraper-0.2.0.tar.gz:

Publisher: release.yml on plenoai/saas-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file saas_scraper-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: saas_scraper-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for saas_scraper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4f4f7d0242df4c4de0fc4b3d33221909cafd1f552ce352afd184b19b5a1971
MD5 d0bb6e3ddf9c03489a7ab0444f7a0f58
BLAKE2b-256 ef8f1b6f6643994d1c139f91c731a8e2794c91c79940cb923f26a50f8e439261

See more details on using hashes here.

Provenance

The following attestation bundles were made for saas_scraper-0.2.0-py3-none-any.whl:

Publisher: release.yml on plenoai/saas-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page