':return: Returns the domain name and the path for the url.'

def get_domain_path(self):

    if self.path:
        res = (((self.scheme + '://') + self.netloc) + self.path[:(self.path.rfind('/') + 1)])
    else:
        res = (((self.scheme + '://') + self.netloc) + '/')
    return URL(res, self._encoding)
