Where Are Email Scanning Modules Located in the user-scanner Codebase?
The email-OSINT functionality resides in the user_scanner/email_scan/ package, with modules organized by service category folders such as social/, shopping/, music/, and news/.
The user-scanner repository implements open-source intelligence (OSINT) email verification through a modular architecture. All email scanning modules are located under the user_scanner/email_scan/ directory, as implemented in kaifcodec/user-scanner. Understanding this directory structure is essential for contributors extending the scanner or developers integrating specific validators into their workflows.
Email-OSINT Package Location
The root entry point for all email scanning capabilities is user_scanner/email_scan/. This directory functions as a Python package via its __init__.py initializer. Each subdirectory represents a service category, and individual Python files within those directories implement validators for specific platforms.
user_scanner/
└─ email_scan/
├─ __init__.py
├─ adult/
├─ community/
├─ creator/
├─ dating/
├─ dev/
├─ entertainment/
├─ learning/
├─ music/
├─ news/
├─ shopping/
├─ social/
└─ travel/
Email Scanning Module Categories
Adult Content Services (adult/)
Contains validators for adult-oriented platforms:
Community Platforms (community/)
Includes forums and neighborhood networks:
Creator Platforms (creator/)
Targets content creator and patronage services:
Dating Services (dating/)
Validates email registration against dating apps:
Developer Services (dev/)
Checks developer-oriented platforms:
Entertainment Streaming (entertainment/)
Covers media and streaming services:
Education Platforms (learning/)
Validates academic and learning sites:
Music Services (music/)
Checks music streaming registrations:
News Outlets (news/)
Validates email against journalism platforms:
E-commerce (shopping/)
Targets online retail services:
Social Networks (social/)
The most comprehensive category for mainstream platforms:
Travel Services (travel/)
Validates travel and booking platforms:
Validator Implementation Pattern
Every email scanning module follows a consistent asynchronous pattern. In user_scanner/email_scan/music/spotify.py, the implementation appears as:
from user_scanner.core.result import Result
async def validate_spotify(email: str) -> Result:
# Implementation checks email against Spotify API
return Result.taken(extra={...}) # or Result.available(), Result.error(...)
The signature async def validate_<service>(email: str) -> Result is uniform across all modules, enabling the core engine to discover and execute validators dynamically.
Importing and Using Email Scanners
Import individual validators directly from their category paths:
import asyncio
from user_scanner.email_scan.music.spotify import validate_spotify
from user_scanner.email_scan.news.nytimes import validate_nytimes
async def demo():
email = "example@example.com"
spotify_res = await validate_spotify(email)
nytimes_res = await validate_nytimes(email)
print("Spotify:", spotify_res)
print("NYTimes:", nytimes_res)
asyncio.run(demo())
Programmatic Discovery of Email Modules
List all available email scanning modules without hardcoding paths:
import pkgutil
import importlib
def list_email_modules():
pkg = importlib.import_module('user_scanner.email_scan')
for _, mod_name, _ in pkgutil.iter_modules(pkg.__path__):
print(f"Category: {mod_name}")
category_pkg = importlib.import_module(f"user_scanner.email_scan.{mod_name}")
for _, name, _ in pkgutil.iter_modules(category_pkg.__path__):
print(f" → {name}")
list_email_modules()
Key Source Files for Email Scanning
| File Path | Description |
|---|---|
user_scanner/email_scan/__init__.py |
Package initializer enabling email_scan imports |
user_scanner/email_scan/music/spotify.py |
Music service validator example |
user_scanner/email_scan/news/nytimes.py |
News outlet validator example |
user_scanner/email_scan/social/facebook.py |
Social network validator example |
user_scanner/email_scan/shopping/amazon.py |
E-commerce validator example |
user_scanner/email_scan/travel/skyscanner.py |
Travel service validator example |
Summary
- Email scanning modules are located in
user_scanner/email_scan/with subdirectories organizing validators by service type - Each module implements
async def validate_<service>(email: str) -> Resultfollowing a uniform contract - Category folders include
social/,shopping/,music/,news/,dev/,travel/, and others - The
Resultreturn type fromuser_scanner.core.resultstandardizes availability status across all validators - Dynamic module discovery is supported via
pkgutilfor building scanners that automatically incorporate new validators
Frequently Asked Questions
How do I add a new email scanning module to user-scanner?
Create a new Python file in the appropriate category subdirectory under user_scanner/email_scan/. Implement async def validate_<servicename>(email: str) -> Result importing from user_scanner.core.result. If no category folder exists for your service type, create the directory with an __init__.py file.
Why are email scanners organized by category rather than alphabetically?
The categorical structure (social/, shopping/, music/, etc.) groups related services logically, making the codebase navigable for contributors targeting specific industry verticals. This organization mirrors how OSINT investigators typically scope their searches.
Can I use individual email validators without the full user-scanner framework?
Yes. Each validator is self-contained and can be imported directly, as shown in the code examples. The only external dependency is user_scanner.core.result.Result, which you must import or mock for standalone usage.
What does the Result object returned by email validators contain?
According to the source implementation, Result provides methods like .taken(), .available(), and .error() to indicate email registration status. The .taken() method accepts an extra dictionary for additional metadata about the found account.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →