class_docstr: Determines the domain of a url.
  
  Description:
      Calculates the label to identify the network domain of a URL. Supports
      urls with or without protocol as well as international country domains.
  
  Examples:
      >>> url_to_domain = URLToDomain()
      >>> urls =  ['https://play.google.com',
      ...          'http://www.google.co.in',
      ...          'www.facebook.com']
      >>> url_to_domain(urls).tolist()
      ['play.google.com', 'google.co.in', 'facebook.com']
class_docstr_tok: ["Determines","the","domain","of","a","url",".","Description",":","Calculates","the","label","to","identify","the","network","domain","of","a","URL",".","Supports","urls","with","or","without","protocol","as","well","as","international","country","domains",".","Examples",":",">",">",">","url_to_domain","=","URLToDomain","(",")",">",">",">","urls","=","[","'https",":","\/\/play.google.com","'",",","...","'http",":","\/\/www.google.co.in","'",",","...","'www.facebook.com","'","]",">",">",">","url_to_domain","(","urls",")",".tolist","(",")","[","'play.google.com","'",",","'google.co.in","'",",","'facebook.com","'","]"]
code: def get_function(self):
      def url_to_domain(x):
          p = r"^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)"
          return x.str.extract(p, expand=False)
  
      return url_to_domain
  
imports: from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import URL, Categorical
  from featuretools.primitives.base import TransformPrimitive
label_desc: Use image node_id 1 for calling the URLToDomain obj's underlying member method code with example usage: obj.get_function() and returns: url_to_domain, x