Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def domain(self):
  2. long_url = urlparse(self.url).netloc if self.url else "be kind to one another"
  3. return long_url.split('.', 1)[1] if long_url.split('.', 1)[0] == 'www' else long_url
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement