I was trying to clean a url , I tried doing below: >>> from beautifier import Url >>> url = Url('q=?http://www.gogogle.com/help/') >>> url.cleanup 'q=?http://www.gogogle.com/help/' >>> url.domain 'q=?gogogle.com' What i was expecting is either url starts with http/https/www but not q=?