human
how to get domain from url netloc.
assistant
Here is a Python function to get domain from url netloc

import urllib.parse

def get_domain(url):
    """
    Get domain from url netloc.
    """
    return url.split(":")[0]

# Enter the url
url = "https://www.google.com"

# Calling the function
print((get_domain(url)))

#Example Output
# https

#Remember to inspect code for bugs.