INNER CODE UNIT · Python

scan_chunk

OpenOSINT/OpenOSINT · actors/username-recon/src/main.py:118

async def scan_chunk(username: str, chunk: dict) -> list[dict] | None:
    """
    Scan one chunk of sites for username.

    Returns None (not raises) on any failure — timeout or otherwise — so a
    single bad chunk never takes down the run. Not retried: a chunk that
    fails almost always failed because a site in it is unresponsive, and
    retrying the same chunk just waits on the same site again.
    """
    try:
        return await asyncio.wait_for(
            run_username_osint_structured(username, chunk, timeout_seconds=_SITE_REQUEST_TIMEOUT_SECONDS),
            timeout=_CHUNK_TIMEOUT_SECONDS,
        )
    except Exception as exc:
        Actor.log.warning(
            f"{username}: chunk of {len(chunk)} site(s) failed — {type(exc).__name__}: {exc!r}"
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…