Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sherlock_project/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import requests
from requests_futures.sessions import FuturesSession
from difflib import get_close_matches

from sherlock_project.__init__ import (
__longname__,
Expand Down Expand Up @@ -803,6 +804,12 @@ def main():

if site_missing:
print(f"Error: Desired sites not found: {', '.join(site_missing)}.")

available_site_names = [site.name for site in sites]
for m in site_missing:
matches = get_close_matches(m, available_site_names, n = 2, cutoff=0.4)
if matches:
print(f"Did you mean: {', '.join(matches)}.")

if not site_data:
sys.exit(1)
Expand Down