mirror of
https://github.com/reconurge/flowsint.git
synced 2026-05-06 03:38:31 -05:00
5 lines
219 B
Python
5 lines
219 B
Python
from urllib.parse import urlparse
|
|
def extract_domain(url_or_domain: str) -> str:
|
|
parsed = urlparse(url_or_domain if "://" in url_or_domain else "http://" + url_or_domain)
|
|
return parsed.hostname or url_or_domain
|