URL Utilities

Module: ppc_robot_lib.utils.url

extract_domain(url, strip_www=False)[source]

Extracts a domain from the given URL.

Parameters:
  • url (str) – Input URL.

  • strip_www (bool) – Should we strip the leading www. from the domain?

Return type:

str

Returns:

Domain.