INNER CODE UNIT · Python

_print_mode_summary

atenreiro/opensquat · opensquat/cli.py:108

def _print_mode_summary(mode, scanner):
    """Print the mode-specific lines of the run summary."""
    if mode == "premium_feed":
        print("[*] Mode: Premium Feed")
        return
    if mode != "premium_api":
        return
    print("[*] Mode: Premium API")

    # If the run was cut short (rate limit or quota exhaustion), show the
    # shortfall ratio so the user can tell at a glance that not every
    # requested keyword was processed.
    total = scanner.keywords_total
    made = scanner.api_calls_made
    if total and made < total:
        print(f"[*] API calls made: {made} (of {total})")
    else:
        print("[*] API calls made:", made)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…