Facility: 005162

All Secure Storage

Stale Data Warning: This facility has not been successfully scraped in 26 days (threshold: 3 days). Data may be outdated.
Facility Information active
Facility ID
005162
Name
All Secure Storage
URL
https://www.fortatkinsonstorage.com/catalog
Address
1201 Whitewater Ave, Fort Atkinson, WI 53538, USA, Fort Atkinson, Wisconsin 53538
Platform
custom_facility_005162
Parser File
src/parsers/custom/facility_005162_parser.py
Last Scraped
2026-03-27 14:00:21.215931
Created
2026-03-14 16:21:53.706708
Updated
2026-03-27 14:00:21.243092
Parser & Healing Diagnosis working
Parser Status
✓ Working
Status Reason
N/A
Last Healing Attempt
Not attempted
Parser Source (src/parsers/custom/facility_005162_parser.py)
"""Parser for All Secure Storage (fortatkinsonstorage.com).

Wix-based site. The /catalog page lists unit sizes as h6 headings
(e.g. "10 X 30", "5 X 10 Fort only") but does not publish prices.
"""

from __future__ import annotations

import re

from bs4 import BeautifulSoup

from src.parsers.base import BaseParser, ParseResult, UnitResult


class Facility005162Parser(BaseParser):
    """Extract storage units from All Secure Storage (Wix catalog page)."""

    platform = "custom_facility_005162"

    # Match dimensions like "10 X 30", "5 x 10", "10x20", etc.
    _SIZE_RE = re.compile(
        r"(\d+)\s*[xX\u00d7]\s*(\d+)"
    )

    def parse(self, html: str, url: str = "") -> ParseResult:
        soup = BeautifulSoup(html, "lxml")
        result = ParseResult(platform=self.platform, parser_name=self.__class__.__name__)

        for tag in soup.find_all(["script", "style"]):
            tag.decompose()

        seen: set[str] = set()

        # Strategy 1: Look for h6 headings with dimensions (Wix catalog layout)
        for heading in soup.find_all("h6"):
            text = heading.get_text(strip=True)
            m = self._SIZE_RE.search(text)
            if not m:
                continue

            w_val = float(m.group(1))
            l_val = float(m.group(2))

            # Skip implausible storage dimensions
            if w_val < 3 or l_val < 3:
                continue

            size_str = f"{m.group(1)}x{m.group(2)}"
            if size_str in seen:
                continue
            seen.add(size_str)

            unit = UnitResult()
            unit.size = size_str
            w, ln, sq = self.normalize_size(size_str)
            if w is not None:
                unit.metadata = {"width": w, "length": ln, "sqft": sq}
            # Preserve full heading text as description (may include notes like "Fort only")
            unit.description = text
            result.units.append(unit)

        # Strategy 2: Fall back to scanning all headings (h1-h6) and text blocks
        if not result.units:
            for heading in soup.find_all(["h1", "h2", "h3", "h4", "h5", "h6"]):
                text = heading.get_text(strip=True)
                m = self._SIZE_RE.search(text)
                if not m:
                    continue

                w_val = float(m.group(1))
                l_val = float(m.group(2))

                if w_val < 3 or l_val < 3:
                    continue

                size_str = f"{m.group(1)}x{m.group(2)}"
                if size_str in seen:
                    continue
                seen.add(size_str)

                unit = UnitResult()
                unit.size = size_str
                w, ln, sq = self.normalize_size(size_str)
                if w is not None:
                    unit.metadata = {"width": w, "length": ln, "sqft": sq}
                unit.description = text
                result.units.append(unit)

        # Strategy 3: Regex scan of full body text as last resort
        if not result.units:
            body_text = soup.get_text(separator="\n")
            for m in self._SIZE_RE.finditer(body_text):
                w_val = float(m.group(1))
                l_val = float(m.group(2))
                if w_val < 3 or l_val < 3:
                    continue
                size_str = f"{m.group(1)}x{m.group(2)}"
                if size_str in seen:
                    continue
                seen.add(size_str)

                unit = UnitResult()
                unit.size = size_str
                w, ln, sq = self.normalize_size(size_str)
                if w is not None:
                    unit.metadata = {"width": w, "length": ln, "sqft": sq}
                result.units.append(unit)

        if not result.units:
            result.warnings.append("No units found")
        elif all(u.price is None for u in result.units):
            result.warnings.append("Sizes extracted but no prices listed on site")

        return result

Scrape Runs (5)

Run #1277 Details

Status
exported
Parser Used
Facility005162Parser
Platform Detected
table_layout
Units Found
4
Stage Reached
exported
Timestamp
2026-03-23 03:01:57.462465
Timing
Stage Duration
Fetch3309ms
Detect50ms
Parse18ms
Export6ms

Snapshot: 005162_20260323T030200Z.html · Show Snapshot · Open in New Tab

Parsed Units (4)

10x30

No price

10x20

No price

10x10

No price

5x10

No price

← Back to dashboard