from urllib.parse import urlparse, parse_qs
def extract_query_params(url):
parsed_url = urlparse(url)
return parse_qs(parsed_url.query)
from urllib.parse import urlparse
def extract_domain(url):
return urlparse(url).netloc
import re
def is_valid_email(email):
pattern = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
return re.match(pattern, email) is not None