def lower_case_hostname(url):
 parsed = moves.urllib.parse.urlparse(url)
 replaced = parsed._replace(netloc=parsed.netloc.lower())
 return moves.urllib.parse.urlunparse(replaced)

def lower_case_hostname ( url ) : parsed = moves . urllib . parse . urlparse ( url ) replaced = parsed . _replace ( netloc = parsed . netloc . lower ( ) ) return moves . urllib . parse . urlunparse ( replaced )
change the urls hostname to lowercase .