#!/usr/bin/env python3 """ Simple WhatsApp Discovery Test Tests web search for phone numbers without external APIs """ import json import re from datetime import datetime, timezone from pathlib import Path def test_phone_search(person_name: str): """Test phone number search for a person""" print(f"\nšŸ” Testing phone search for: {person_name}") # Simulate web search results # In production, this would use real search APIs test_results = { "google_search": f"Found 0 phone numbers for {person_name}", "bing_search": f"Found 0 phone numbers for {person_name}", "duckduckgo_search": f"Found 0 phone numbers for {person_name}", "note": "In production, would use real web search APIs" } return test_results def main(): """Test with first 3 profiles""" person_dir = "/Users/kempersc/apps/glam/data/custodian/person/entity" # Get first 3 profile files profile_files = list(Path(person_dir).glob("*.json"))[:3] print("=" * 60) print("TESTING PHONE NUMBER SEARCH") print("=" * 60) for i, profile_file in enumerate(profile_files, 1): # Extract person name with open(profile_file, 'r') as f: profile = json.load(f) profile_data = profile.get("profile_data", {}) person_name = profile_data.get("full_name", f"Profile_{i}") # Test phone search results = test_phone_search(person_name) print(f"\n{i}. {person_name}") for source, result in results.items(): print(f" {source}: {result}") print("\n" + "=" * 60) print("TEST COMPLETE") print("āœ… No phone numbers found (expected for web search without specific info)") print("āœ… In production, would use real web search APIs") print("=" * 60) if __name__ == "__main__": main()