code: def setUrl(self, url):
          
          if isUrl(url):
              self._url = url
          else:
              raise exceptions.BadUrlException(url)
          return self
docs: Attempt to safely set the URL by string.