Skip to main content

Autonomous web crawler for capturing user journeys

Project description

UX Journey Scraper

CI/CD Pipeline codecov Python 3.9+ License: MIT

Autonomous web crawler for capturing user journeys.

A powerful tool for UX designers, developers, and QA teams to autonomously capture complete user flows through websites.

๐ŸŽฏ What It Does

Core Features (v0.3.0)

  • ๐Ÿค– Autonomous Crawling: Intelligently navigates websites without manual intervention
  • ๐ŸŽฏ Smart Element Detection: Finds ALL clickables (buttons, links, onclick handlers, ARIA roles)
  • ๐Ÿ“ธ Journey Capture: Records complete user flows with screenshots at each step
  • ๐Ÿ” Auth Support: Handles login flows and session management
  • ๐Ÿ“‹ Form Filling: Automatically fills checkout forms (test data only)
  • ๐Ÿ•ต๏ธ Stealth Mode: Anti-bot detection with human-like behavior simulation
  • ๐Ÿ”„ SPA Support: Works with modern single-page applications
  • ๐Ÿ›ก๏ธ Privacy-Aware: Automatically blurs PII in screenshots

๐Ÿš€ Installation

PyPI Installation (Recommended)

# Install latest version (v0.3.0 - Autonomous Crawling)
pip install ux-journey-scraper

Installation from Source

# Clone the repository
git clone https://github.com/resabh/ux-journey-scraper.git
cd ux-journey-scraper

# Install in development mode
pip install -e .

# OR install with full UX guidelines support
pip install -e ".[full]"

Note: The [full] option includes ecommerce-ux-guidelines package for detailed UX analysis. The base installation works fully for autonomous crawling and journey capture without it.

Post-Installation

After installation, install Playwright browsers:

playwright install chromium

๐Ÿ“– Quick Start

Autonomous Crawl (v0.3.0)

# Create a configuration file (see scrape-config.example.yaml)
ux-journey crawl --config scrape-config.yaml --output-dir journey_output/

# The tool will:
# 1. Check robots.txt (asks for confirmation if needed)
# 2. Autonomously navigate through the site
# 3. Capture screenshots at each step
# 4. Record complete user journey
# 5. Save journey data as JSON + screenshots

Manual Recording (Deprecated)

# Manually record a journey (interactive mode)
ux-journey record \
  --start-url https://example.com \
  --output my-journey.json

# Note: Use 'crawl' for autonomous navigation

๐Ÿ’ก Use Cases

1. Competitor Analysis

Capture competitor websites to understand user flows and patterns.

ux-journey crawl --config competitor-config.yaml --output-dir competitor_journey/

2. User Flow Documentation

Document user flows with screenshots for design/QA teams.

ux-journey crawl --config mysite-config.yaml --output-dir user_flows/

3. Pre-Launch Testing

Capture staging sites before launch.

ux-journey crawl --config staging-config.yaml --output-dir staging_test/

4. QA Automation

Automated journey capture for regression testing.

ux-journey crawl --config qa-config.yaml --output-dir qa_snapshots/

๐Ÿ› ๏ธ Features

Journey Recording

  • โœ… Autonomous crawling with priority queue
  • โœ… Multi-step journey capture
  • โœ… Automatic screenshot on each navigation
  • โœ… HTML structure extraction
  • โœ… Form field detection and auto-fill
  • โœ… CTA and button analysis
  • โœ… Navigation element capture
  • โœ… Session management and auth support

Accessibility

  • โœ… WCAG 2.1 Level A/AA validation
  • โœ… Color contrast analysis
  • โœ… Keyboard navigation checks
  • โœ… Screen reader compatibility
  • โœ… ARIA attributes validation

Privacy & Security

  • โœ… PII blur in screenshots (emails, credit cards, names)
  • โœ… robots.txt respect (with user confirmation)
  • โœ… Rate limiting
  • โœ… No data collection or tracking

Reports

  • โœ… Interactive HTML reports
  • โœ… Annotated screenshots with issue markers
  • โœ… JSON export for automation
  • โœ… Journey flow visualization
  • โœ… Issue summaries and scores

๐Ÿ“‹ CLI Reference

ux-journey record

Record a user journey interactively.

ux-journey record [OPTIONS]

Options:
  --start-url TEXT         Starting URL (required)
  --output TEXT            Output file path (default: journey.json)
  --viewport TEXT          Viewport size (default: 1920x1080)
  --blur-pii               Blur PII in screenshots (default: true)
  --respect-robots         Check robots.txt (default: true)
  --headless              Run in headless mode (default: false)

๐Ÿ”ง Python API

from ux_journey_scraper import JourneyRecorder, Journey
from ux_journey_scraper.config import ScrapeConfig
from ux_journey_scraper.core import AutonomousCrawler

# Option 1: Autonomous crawling with config
config = ScrapeConfig.load("scrape-config.yaml")
crawler = AutonomousCrawler(config=config, output_dir="journey_output/")
journey = await crawler.crawl()

# Option 2: Manual recording (deprecated)
recorder = JourneyRecorder(
    start_url="https://example.com",
    blur_pii=True,
    respect_robots=True
)
journey = await recorder.record()
journey.save("my-journey.json")

# Load existing journey
journey = Journey.load("journey.json")

# Access journey data
for step in journey.steps:
    print(f"Step {step.step_number}: {step.title}")
    print(f"  URL: {step.url}")
    print(f"  Screenshot: {step.screenshot_path}")

๐Ÿ“Š Sample Journey Output

{
  "start_url": "https://example.com",
  "start_time": "2026-03-19T12:00:00Z",
  "end_time": "2026-03-19T12:05:30Z",
  "viewport": [1920, 1080],
  "steps": [
    {
      "step_number": 1,
      "url": "https://example.com",
      "title": "Homepage",
      "screenshot_path": "screenshots/step-001.png",
      "html_snapshot": "...",
      "page_data": {
        "forms": [...],
        "buttons": [...],
        "links": [...]
      }
    },
    ...
  ]
}

๐Ÿ” How It Works

  1. Configuration

    • YAML config defines seed URLs, auth, form fill settings
    • Priority queue manages navigation strategy
  2. Autonomous Crawling

    • Launches stealth browser (anti-bot detection)
    • Navigates autonomously using priority queue
    • Finds ALL clickables (buttons, links, ARIA roles, onclick handlers)
    • Handles login flows and session management
    • Fills forms with test data (payment safeguards)
  3. Capture

    • Waits for page readiness (DOM stable, no spinners, lazy-load complete)
    • Captures screenshot + HTML at each step
    • Blurs PII automatically
    • Records all page data (forms, buttons, links)
  4. Output

    • Saves journey JSON with all steps
    • Screenshots folder with PII blurred
    • Complete DOM snapshots for analysis

๐Ÿ›ฃ๏ธ Roadmap

v0.3.0 (Current) - Pure Journey Capture

  • โœ… Autonomous crawling with priority queue
  • โœ… Desktop web journey recording
  • โœ… Smart element detection (4 strategies)
  • โœ… Auth support and session management
  • โœ… Form auto-fill with safeguards
  • โœ… PII blur in screenshots
  • โœ… robots.txt handling
  • โœ… Stealth mode (anti-bot detection)

Future Enhancements

  • โฌœ Mobile viewports (responsive crawling)
  • โฌœ Multi-page site mapping
  • โฌœ CAPTCHA handling improvements
  • โฌœ Visual regression detection
  • โฌœ Performance metrics capture
  • โฌœ CI/CD integration

Analysis Features โ†’ Moved to BayMAAR

  • UX guidelines analysis is now in the separate BayMAAR Analysis Engine (private)
  • This package remains a pure journey capture tool

๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file for details

๐Ÿ”— Related Projects

๐Ÿ“ž Support


Made with โค๏ธ for better user experiences

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

ux_journey_scraper-0.3.0.tar.gz (49.3 kB view details)

Uploaded Source

Built Distribution

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

ux_journey_scraper-0.3.0-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

Details for the file ux_journey_scraper-0.3.0.tar.gz.

File metadata

  • Download URL: ux_journey_scraper-0.3.0.tar.gz
  • Upload date:
  • Size: 49.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for ux_journey_scraper-0.3.0.tar.gz
Algorithm Hash digest
SHA256 878030d7a430eef2e3c02ccf6d507cfd29298484af26a451e61a5a93df617f20
MD5 50406d214a08e8a9e363bded9799166a
BLAKE2b-256 a9fa70b1cbb531c9a428417194621544b07ff7d1050373a591ae07e8b948d91a

See more details on using hashes here.

File details

Details for the file ux_journey_scraper-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ux_journey_scraper-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a811a13735dcad5e8c66accadee89cd865c1206991ae292792f56c8e1032a4c
MD5 91ca25739eea3c1e1e7220b4fe90a9e4
BLAKE2b-256 737b0cfb057e798e673fe82e83ed1b3e56f6b0ff32fb8e2eb6f2be22d803ff06

See more details on using hashes here.

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