def METHOD_NAME(self, new_url, custom=False):
    if custom and not new_url:
        return True
    if validators.url(new_url) != True:
        if custom:
            logger.warning("Invalid custom url: {0}".format(self.custom_url))
        else:
            logger.debug("Url changing has failed!")
        return False
    self.url = new_url
    self.urls = {"login": urljoin(self.url, "user/login"), "search": urljoin(self.url, "engine/search")}
    return True