def set_query(self, path): """Set the 'query' component of the URL. @type path: str """ newurl = urlparse.urlunparse( (self._urlobj.scheme, self._urlobj.netloc, self._urlobj.path, self._urlobj.params, query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_scheme(self, scheme): """Set the 'scheme' component of the URL. @type scheme: str """ newurl = urlparse.urlunparse( (scheme, self._urlobj.netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_fragment(self, fragment): """Set the 'fragment' component of the URL. @type fragment: str """ newurl = urlparse.urlunparse( (self._urlobj.scheme, self._urlobj.netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_password(self, password): """Set the 'password' component of the URL. @type password: str """ netloc = self._make_netloc(self._urlobj.username, password, self._urlobj.hostname, self._urlobj.port) newurl = urlparse.urlunparse( (self._urlobj.scheme, netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_query(self, path): """Set the 'query' component of the URL. @type path: str """ newurl = urlparse.urlunparse((self._urlobj.scheme, self._urlobj.netloc, self._urlobj.path, self._urlobj.params, query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_fragment(self, fragment): """Set the 'fragment' component of the URL. @type fragment: str """ newurl = urlparse.urlunparse((self._urlobj.scheme, self._urlobj.netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_scheme(self, scheme): """Set the 'scheme' component of the URL. @type scheme: str """ newurl = urlparse.urlunparse((scheme, self._urlobj.netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_host(self, host): """Set the 'host' component of the URL. @type host: str """ netloc = self._make_netloc(self._urlobj.username, self._urlobj.password, host, self._urlobj.port) newurl = urlparse.urlunparse( (self._urlobj.scheme, netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_password(self, password): """Set the 'password' component of the URL. @type password: str """ netloc = self._make_netloc(self._urlobj.username, password, self._urlobj.hostname, self._urlobj.port) newurl = urlparse.urlunparse((self._urlobj.scheme, netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)
def set_host(self, host): """Set the 'host' component of the URL. @type host: str """ netloc = self._make_netloc(self._urlobj.username, self._urlobj.password, host, self._urlobj.port) newurl = urlparse.urlunparse((self._urlobj.scheme, netloc, self._urlobj.path, self._urlobj.params, self._urlobj.query, self._urlobj.fragment)) self._urlobj = urlparse.urlparse(newurl)