Return url to use for this user.
344952
def user_photo_url(user, size):
    """"""
    endpoint, kwargs = user_url_args(user, size)
    return url_for(endpoint, **kwargs)
1372543
async def get_url(self):
        
        if self.type == ChatType.PRIVATE:
            return f"tg://user?id={self.id}"

        if self.username:
            return f'https://t.me/{self.username}'

        if self.invite_link:
            return self.invite_link

        await self.update_chat()
        return self.invite_link
836232
def visit_loginurl(self):
        """"""
        url = self.config["loginurl"]
        if not url:
            return
        user, password = self.config.get_user_password(url)
        session = requests.Session()
        # XXX user-agent header
        # XXX timeout
        response = session.get(url)
        cgiuser = self.config["loginuserfield"]
        cgipassword = self.config["loginpasswordfield"]
        form = formsearch.search_form(response.content, cgiuser, cgipassword,
              encoding=response.encoding)
        form.data[cgiuser] = user
        form.data[cgipassword] = password
        for key, value in self.config["loginextrafields"].items():
            form.data[key] = value
        formurl = urlparse.urljoin(url, form.url)
        response = session.post(formurl, data=form.data)
        self.cookies = session.cookies
        if len(self.cookies) == 0:
            raise LinkCheckerError("No cookies set by login URL %s" % url)
1205451
def _get_url(self, url):
        
        url = str(url)
        if url != 'default' and not '://' in url:
            url = ':///'.join(('file', url))
        return url
373976
def url(self, version=None, **kwargs):
        """"""
        for url in self.urls(version):
            if [key for key in kwargs.keys() if not '{' + key + '}' in url]:
                continue

            return url.format(**kwargs)

        raise KeyError('URL that takes all provided parameters not found')
79691
def do(self):
        ""
        _PR = urlparse(self.url)
        return _PR.scheme, _PR.netloc, _PR.path, _PR.params, _PR.query, _PR.fragment
1023328
def current_site_url():
    """"""
    protocol = getattr(settings, 'MY_SITE_PROTOCOL', 'https')
    port     = getattr(settings, 'MY_SITE_PORT', '')
    url = '%s://%s' % (protocol, settings.SITE_DOMAIN)
    if port:
        url += ':%s' % port
    return url
748092
def make_url(*args, **kwargs):
    """"""
    base = "/".join(args)
    if kwargs:
        return "%s?%s" % (base, urlencode(kwargs))
    else:
        return base
238384
def url(self, name):
        """"""
        scheme = 'http'
        path = self._prepend_name_prefix(name)
        query = ''
        fragment = ''
        url_tuple = (scheme, self.netloc, path, query, fragment)
        return urllib.parse.urlunsplit(url_tuple)
559252
def _buildUrl(self):
		""""""
		return '%(protocol)s://%(host)s:%(port)s%(address)s'%{
			'protocol': self._protocol,
			'host': self._host,
			'port': self._port,
			'address': self._address,
		}
996703
def resource_url(self):
        """"""
        if self._iam:
            self._resource_url = self._resource_url or _get_iam_rest_api_url_from_creds(self.rest_client, self.credentials)
        else:
            self._resource_url = self._resource_url or _get_rest_api_url_from_creds(self.session, self.credentials)
        return self._resource_url
225672
def get_url(self, url):
        
        if url.startswith('/'):
            url = '%s%s' % (self.base_url, url)
        return url
607510
def user(self, user):
        """"""

        resource = self.RUSER + '/' + user
        params = {}

        result = [page for page in self._fetch(resource, params)]

        return result[0]
786095
def url(self):
        """"""
        return self.get_url(self.world, self.category, self.vocation, self.page)
1296258
def url_for(self, resource, **values):
        """"""
        endpoint = resource.endpoint
        if self.blueprint:
            endpoint = '{0}.{1}'.format(self.blueprint.name, endpoint)
        return url_for(endpoint, **values)
1010668
def url(self):
        ""
        # The authorize url is always api.xero.com
        query_string = {'oauth_token': self.oauth_token}

        if self.scope:
            query_string['scope'] = self.scope

        url = XERO_BASE_URL + AUTHORIZE_URL + '?' + \
              urlencode(query_string)
        return url
466144
def get_url(self, url):
        
        _r = self.br.open(url)

        # check that we've not been redirected to the login page
        if self.br.geturl().startswith(self.AUTH_URL):
            raise AuthRequiredException
        elif self.br.geturl().startswith(self.ERROR_URL):
            raise RequestErrorException
        else:
            return _r.read()