I know that there is parse_url and then you get get the ['host'], but that returns the full www.example.com. What I want is the following:
https://stackoverflow.com/questions/ask turns to stackoverflow
https://console.aws.amazon.com/s3/home?region=us-west-2 turns to amazon
https://www.google.com/ turns to google
Any suggestions on how to do that?